/*
 * Volcafe — front-end component styles
 * Shortcodes: [vs_svg] [vs_gallery] [vs_team_slider] [vs_stocks]
 *
 * Colour variables (--awb-color1 … --awb-color6) are provided by the Avada
 * theme. Fallbacks are given where a sensible one exists; on a non-Avada
 * theme, define these variables globally.
 *
 * The team accordion breakpoint relies on the body classes .is-small /
 * .is-medium / .is-large (set by the child theme or edfman-config).
 */

/* ── SVG [vs_svg] ─────────────────────────────────────────────────────────── */

.vs-svg--full {
    display: block;
    width: 100%;
}

.vs-svg--full svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Country map [vs_country_map] ─────────────────────────────────────────── */

.vs-country-map {
    display: inline-block;
    line-height: 0;
    color: inherit;
}

.vs-country-map svg,
.vs-country-map img {
    display: block;
    width: auto;
    height: 1em;
}

/* [vs_country_map class="vs-svg--full"] — reuses the [vs_svg] full-width
   utility. Needs its own (higher-specificity) override here since the
   default 1em sizing above would otherwise win the cascade on equal
   specificity by simply coming later in the file. */
.vs-country-map.vs-svg--full svg,
.vs-country-map.vs-svg--full img {
    width: 100%;
    height: auto;
}

.vsc-stocks-country-name .vsc-stocks-country-map {
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
}

.vsc-stocks-country-name .vs-country-map svg,
.vsc-stocks-country-name .vs-country-map img {
    height: 1.1em;
}

/* ── Gallery [vs_gallery] ─────────────────────────────────────────────────── */
/* The wrapper carries a layout modifier: .vs-gallery--slider (default).
   Rules below are the "slider" layout; future layouts add their own blocks
   scoped to their modifier, e.g. .vs-gallery--grid { … }. */

.vs-gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vs-gallery-wrapper .swiper-slide {
    position: relative;
    overflow: hidden;
}

.vs-gallery-wrapper .swiper {
    padding-bottom: 0 !important;
}

.vs-gallery-wrapper .vs-slide-bg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Corner radius — per gallery (`vs_gallery_radius`, emitted by the template
   as --vs-gallery-radius). Slider: each slide. Main + Thumbnails: the main
   image container, so slides clip to it mid-transition. */
.vs-gallery--slider .vs-slide-bg {
    border-radius: var(--vs-gallery-radius, 0);
}

.vs-gallery--main-thumbs .vs-gallery-main {
    border-radius: var(--vs-gallery-radius, 0);
}

/* Desktop: center slide visually larger; scale doesn't affect layout so
   Swiper's translateX calculations stay correct throughout the transition */
@media (min-width: 1024px) {
    .vs-gallery-wrapper .swiper-slide {
        transform: scale(0.9);
        transition: transform 0.3s ease;
    }
    .vs-gallery-wrapper .swiper-slide-active {
        transform: scale(1);
    }
}

.vs-gallery-wrapper .swiper-pagination {
    position: absolute !important;
    bottom: 14px !important;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center !important;
    align-items: center;
    gap: var(--vs-gallery-dot-gap, 6px);
    z-index: 20;
}

.vs-gallery-wrapper .vs-slide-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    pointer-events: none;
}

.vs-gallery-wrapper .vs-slide-caption span {
    display: block;
    padding: 0.6rem 1.1rem;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .85);
    max-width: 100%;
}

/* Custom nav arrows — own class names, no overlap with Avada/Swiper defaults */
.vs-gallery-wrapper .vs-nav-prev,
.vs-gallery-wrapper .vs-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-gallery-wrapper .vs-nav-prev { left: 12px; }
.vs-gallery-wrapper .vs-nav-next { right: 12px; }

.vs-gallery-wrapper .vs-nav-prev::after,
.vs-gallery-wrapper .vs-nav-next::after {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}

.vs-gallery-wrapper .vs-nav-prev::after {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.vs-gallery-wrapper .vs-nav-next::after {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* Bullets — explicit size overrides Avada's undefined --awb-dots-size variable */
.vs-gallery-wrapper .swiper-pagination-bullet {
    width: var(--vs-gallery-dot-size, 10px) !important;
    height: var(--vs-gallery-dot-size, 10px) !important;
    margin: 0 !important;
    background: var(--vs-gallery-dot-color-inactive, #fff) !important;
    opacity: 0.6;
}

.vs-gallery-wrapper .swiper-pagination-bullet-active {
    background: var(--vs-gallery-dot-color, #c8a951) !important;
    opacity: 1;
}

/* Dots position (Volcafe → Settings → Gallery): "overlay" (default, above) sits
   inside the slider; "outside" pushes the dots into normal flow below it. */
.vs-gallery-wrapper.vs-dots--outside .swiper-pagination {
    position: static !important;
    margin-top: 12px;
}

/* Layout: main-thumbs — main slide area + a scrollable thumbnail strip.
   Thumbnails position (Gallery post → "Thumbnails position" field):
   .vs-thumbs--below (default) is a horizontal strip under the main image;
   .vs-thumbs--side puts a vertical column beside it, like the original
   theme's gallery-slider.php. */

.vs-gallery--main-thumbs.vs-thumbs--below .vs-gallery-thumbs {
    margin-top: var(--vs-gallery-thumbs-gap, 10px);
    padding: 2px;
    box-sizing: border-box;
}

.vs-gallery--main-thumbs.vs-thumbs--side {
    display: flex;
    align-items: stretch;
    gap: var(--vs-gallery-thumbs-gap, 10px);
}

.vs-gallery--main-thumbs.vs-thumbs--side .vs-gallery-main {
    flex: 1 1 auto;
    min-width: 0;
}

.vs-gallery--main-thumbs.vs-thumbs--side .vs-gallery-thumbs {
    position: relative;
    flex: 0 0 100px;
    padding: 2px;
    box-sizing: border-box;
}

.vs-gallery--main-thumbs.vs-thumbs--side .vs-gallery-thumbs .swiper-slide {
    width: 100%;
    height: 70px;
}

/* Mobile: hide the sidebar entirely, only the main image shows. Removing it
   from the flex row (rather than just visually hiding it) lets .vs-gallery-main
   (flex: 1 1 auto) naturally expand to fill the full width on its own. */
@media (max-width: 767px) {
    .vs-gallery--main-thumbs.vs-thumbs--side .vs-gallery-thumbs {
        display: none;
    }
}

/* Up/down nav for the vertical thumbs column — same arrow language as the
   main slider's prev/next, rotated 90°. Not looped (unlike the main slider),
   so Swiper's navigation module adds `swiper-button-disabled` at either end. */
.vs-gallery-thumbs .vs-thumb-nav-up,
.vs-gallery-thumbs .vs-thumb-nav-down {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    width: 32px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-gallery-thumbs .vs-thumb-nav-up { top: 2px; }
.vs-gallery-thumbs .vs-thumb-nav-down { bottom: 2px; }

.vs-gallery-thumbs .vs-thumb-nav-up::after,
.vs-gallery-thumbs .vs-thumb-nav-down::after {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}

.vs-gallery-thumbs .vs-thumb-nav-up::after {
    transform: rotate(-45deg);
    margin-top: 2px;
}

.vs-gallery-thumbs .vs-thumb-nav-down::after {
    transform: rotate(135deg);
    margin-bottom: 2px;
}

.vs-gallery-thumbs .vs-thumb-nav-up.swiper-button-disabled,
.vs-gallery-thumbs .vs-thumb-nav-down.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.vs-gallery--main-thumbs .vs-gallery-thumbs .swiper-slide {
    width: 90px;
    height: 64px;
    cursor: pointer;
    border-radius: var(--vs-gallery-thumb-radius, 0);
    box-sizing: border-box;
    overflow: hidden;
    background-color: var(--vs-gallery-thumb-bg-color, #fff);
}

/* Opacity lives on the image layer, not the slide box — a background-color on
   the box itself would fade along with it, defeating the point of having one
   (Gallery post → "Thumbnails background colour" field). Inactive thumbs let
   that colour show through at 45%; the active one is fully opaque. */
.vs-gallery--main-thumbs .vs-gallery-thumbs .vs-thumb-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.vs-gallery--main-thumbs .vs-gallery-thumbs .swiper-slide-thumb-active .vs-thumb-bg {
    opacity: 1;
}

/* ── Team Members [vs_team_slider] ────────────────────────────────────────── */

body:not(.is-small) .vs-team .vs-team-is-large { display: block; }
body:not(.is-small) .vs-team .vs-team-is-small { display: none; }
body.is-small       .vs-team .vs-team-is-large { display: none; }
body.is-small       .vs-team .vs-team-is-small { display: block; }

.vs-team {
    position: relative;
    overflow: hidden;
    padding-bottom: 50px;
}

.vs-team .swiper-slide {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

.vs-team .vs-member *,
.vs-team .vs-member > div::before {
    transition: all 0.4s;
}

.vs-team .vs-member {
    flex: 0 1 calc(25% - 14px);
    background-size: cover;
    background-position: center center;
    border-radius: 4px;
    aspect-ratio: 5 / 6;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Colour overlay — per-member hex injected via inline <style> in template */
.vs-team .vs-member > div::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--awb-color6);
    opacity: 0;
}
.vs-team .vs-member:hover > div::before {
    opacity: 0.8;
}

.vs-team .vs-member .vs-member-name,
.vs-team .vs-member .vs-member-role,
.vs-team .vs-member .vs-member-details {
    z-index: 100;
    position: relative;
    top: 170px;
    color: var(--awb-color1);
    font-size: 13px;
}
.vs-team .vs-member .vs-member-details {
    top: 200px;
}
.vs-team .vs-member:hover .vs-member-name,
.vs-team .vs-member:hover .vs-member-role,
.vs-team .vs-member:hover .vs-member-details {
    top: 5px;
}
.vs-team .vs-member .vs-member-role {
    margin: 0 0 10px 0;
}
.vs-team .vs-member .vs-member-name h5 {
    color: var(--awb-color1);
    font-weight: bold;
    font-size: 22px;
    position: relative;
    z-index: 10;
    margin: 0 0 15px 0;
    padding: 0;
}

/* padding-bottom tells Swiper to reserve that space below slides for the dots */
.vs-team .team-members-swiper {
    padding-bottom: 48px;
}
.vs-team .swiper-pagination {
    position: absolute;
    bottom: 12px !important;
    z-index: 10;
    display: flex;
    justify-content: center !important;
    align-items: center;
    gap: var(--vs-team-dot-gap, 10px);
}
.vs-team .swiper-pagination-bullet {
    background-color: var(--vs-team-dot-color-inactive, #fff);
    opacity: 0.6;
    width: var(--vs-team-dot-size, 12px);
    height: var(--vs-team-dot-size, 12px);
    margin: 0 !important;
}
.vs-team .swiper-pagination-bullet-active {
    background-color: var(--vs-team-dot-color, #c8a951);
    opacity: 1;
}

/* Dots position (Volcafe → Settings → Team Slider): "overlay" (default) sits
   inside the slider; "outside" pushes the dots into normal flow below it. */
.vs-team.vs-dots--outside {
    padding-bottom: 0;
}
.vs-team.vs-dots--outside .swiper-pagination {
    position: static !important;
    margin-top: 14px;
}

/* Small-screen accordion */
.vs-team-is-small * {
    transition: all 0.4s;
}
.vs-team-small-ctn {
    height: 100%;
    overflow: hidden;
}
.vs-team .vs-team-is-small .vs-member {
    aspect-ratio: 5 / 2;
    margin-bottom: 20px;
}
.vs-team .vs-team-is-small .vs-member:not(.active) > div::before {
    opacity: 0 !important;
}
.vs-team .vs-team-is-small .vs-member.active {
    aspect-ratio: 5 / 6;
}
.vs-team .vs-team-is-small .vs-member .vs-member-name,
.vs-team .vs-team-is-small .vs-member .vs-member-role,
.vs-team .vs-team-is-small .vs-member .vs-member-details {
    top: 35px;
}
.vs-team .vs-team-is-small .vs-member .vs-member-details {
    margin-top: 50px;
}
.vs-team .vs-team-is-small .vs-member .vs-member-name h5 {
    margin-bottom: 5px;
}

/* ── History [vs_history] ─────────────────────────────────────────────────── */
/* One Swiper for all breakpoints — each slide holds image + title + excerpt
   together; CSS reflows the slide (row on desktop, stacked on mobile) rather
   than running a second Swiper/DOM copy for small screens. */

.vs-history {
    position: relative;
    padding-bottom: 56px;
}

.vs-history .swiper-slide {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .vs-history .swiper-slide {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }
}

.vs-history-image {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 6 / 5;
    background-size: cover;
    background-position: center center;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .vs-history-image {
        width: 45%;
    }
}

.vs-history-text {
    flex: 1 1 auto;
    min-width: 0;
}

.vs-history-title {
    margin: 0 0 12px;
    /* !important: Avada's own typography CSS ships e.g.
       ".fusion-post-content h3, .post-content h3, … h3 { color: var(--h3_typography-color) }"
       — more specific than a single class, so it silently wins over a plain
       .vs-history-title rule whenever this shortcode sits inside a normal
       content area (the usual place to put it). */
    color: #fff !important;
}

.vs-history-excerpt {
    margin: 0;
    line-height: 1.6;
    color: #fff !important;
}

.vs-history .vs-nav-prev,
.vs-history .vs-nav-next {
    /* Hidden — navigation is via the year links. Swiper still points its
       Navigation module at these elements (harmless; nothing to click). */
    display: none;
}
.vs-history .vs-nav-prev { left: -12px; }
.vs-history .vs-nav-next { right: -12px; }
.vs-history .vs-nav-prev::after,
.vs-history .vs-nav-next::after {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    border-top: 2px solid var(--awb-color1, #333);
    border-right: 2px solid var(--awb-color1, #333);
}
.vs-history .vs-nav-prev::after { transform: rotate(-135deg); margin-left: 4px; }
.vs-history .vs-nav-next::after { transform: rotate(45deg); margin-right: 4px; }

/* Simple text links (no pills/borders) — centered under the image column on
   desktop (the image is the first 45% of each slide, see .vs-history-image),
   full width on mobile since the image is full width there too. */
.vs-history-year-links {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .vs-history-year-links {
        right: auto;
        width: 45%;
    }
}

.vs-history-year-links li a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: font-size 0.5s ease;
}

.vs-history-year-links li.active a {
    font-size: 28px;
}

/* ── Stocks table [vs_stocks] ─────────────────────────────────────────────── */

.vsc-stocks-country {
    margin-bottom: 56px;
}

.vsc-stocks-country-name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px;
}

.vsc-stocks-table-wrap {
    overflow-x: auto;
}

.vsc-stocks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

.vsc-stocks-table thead th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--awb-color6);
    border-bottom: 2px solid var(--awb-color6);
    white-space: nowrap;
    user-select: none;
}

.vsc-stocks-table thead th[data-col] {
    cursor: pointer;
}

.vsc-stocks-table thead th[data-col]:hover {
    color: var(--awb-color3);
}

.vsc-stocks-table thead th.sort-asc::after  { content: ' \2191'; }
.vsc-stocks-table thead th.sort-desc::after { content: ' \2193'; }

.vsc-stocks-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,.07);
    transition: background-color .15s;
}

.vsc-stocks-table tbody tr:last-child {
    border-bottom: none;
}

.vsc-stocks-table tbody tr:hover {
    background-color: rgba(0,0,0,.03);
}

.vsc-stocks-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.vsc-stocks-actions {
    white-space: nowrap;
    text-align: right;
}

.vsc-btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 2px;
    text-decoration: none !important;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color .2s, color .2s, border-color .2s;
    line-height: 1.4;
}

.vsc-btn:first-child {
    margin-left: 0;
}

.vsc-btn-dark {
    background-color: var(--awb-color6);
    color: var(--awb-color1) !important;
    border: 1px solid var(--awb-color6);
}

.vsc-btn-dark:hover {
    background-color: var(--awb-color3);
    border-color: var(--awb-color3);
    color: var(--awb-color1) !important;
}

.vsc-btn-outline {
    background: transparent;
    border: 1px solid var(--awb-color6);
    color: var(--awb-color6) !important;
}

.vsc-btn-outline:hover {
    background-color: var(--awb-color6);
    color: var(--awb-color1) !important;
}

.vsc-stocks-empty {
    font-style: italic;
    color: #666;
}

/* ── Product details [vs_product_details] ──────────────────────────────────── */

.vsc-product-details-map {
    max-width: 120px;
    margin-bottom: 20px;
    color: var(--awb-color1);
}

.vsc-product-details-map svg,
.vsc-product-details-map img {
    display: block;
    width: 100%;
    height: auto;
}

.vsc-product-details-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px 32px;
    margin: 0;
}

.vsc-product-details-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 8px;
}

.vsc-product-details-row dt {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    margin-bottom: 2px;
}

.vsc-product-details-row dd {
    margin: 0;
    font-weight: 600;
    color: var(--awb-color1);
}

/* ── By the Numbers (bundled Fusion Library element) ───────────────────────── */
/* .vsc-numbers is baked into assets/fusion-library/by-the-numbers.xml itself,
   so this needs to travel with the plugin — a site importing that element
   otherwise gets unstyled markup. Site-specific overrides (e.g. a purple-
   background context) belong in that site's own theme, not here. */

.vsc-numbers .fusion-counter-box .counter-box-container {
    padding: 0 !important;
    border: 0 !important;
}

.vsc-numbers .fusion-counter-box .content-box-counter {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    font-weight: bold;
}

.vsc-numbers .fusion-counter-box .counter-box-content {
    text-align: left;
    line-height: 1.1;
}
