/* ==========================================================================
   MegaPets 2.0 — Delivery Country Map

   File path: components/delivery-countries-blocks/delivery-country-map/delivery-country-map.css
   Responsibility: Premium responsive map and country-detail panel.
   ========================================================================== */

.mp-delivery-country-map,
.mp-delivery-country-map * {
    box-sizing: border-box;
}

.mp-delivery-country-map {
    --mp-delivery-map-gold:
        var(--mp-color-gold, #c79a57);
    --mp-delivery-map-gold-light:
        var(--mp-color-gold-light, #d7ac69);
    --mp-delivery-map-gold-dark:
        var(--mp-color-gold-dark, #b8833e);
    --mp-delivery-map-ink: var(--mp-color-brown-chocolate, #39291f);
    --mp-delivery-map-muted: #7b6755;
    --mp-delivery-map-surface: var(--mp-color-surface, #fffdfa);
    --mp-delivery-map-canvas: #f3ecdf;
    --mp-delivery-map-context: #f7f6f6;
    --mp-delivery-map-context-stroke: #d1cfcd;
    --mp-delivery-map-available: #f3e9da;
    --mp-delivery-map-available-stroke: #ddc29a;
    --mp-delivery-map-hover: #efe3d0;
    --mp-delivery-map-selected: var(--mp-color-gold, #c79a57);
    --mp-delivery-map-selected-stroke:
        var(--mp-color-gold-dark, #b8833e);
    --mp-delivery-map-border: rgba(199, 154, 87, .28);

    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--mp-delivery-map-ink);
    font-family: var(--mp-font-body, Manrope, Arial, sans-serif);
}

@supports (color: color-mix(in srgb, black, white)) {
    .mp-delivery-country-map {
        --mp-delivery-map-context:
            color-mix(
                in srgb,
                var(--mp-color-grey, #5b544d) 5%,
                var(--mp-color-surface, #fff) 95%
            );
        --mp-delivery-map-context-stroke:
            color-mix(
                in srgb,
                var(--mp-color-grey, #5b544d) 28%,
                var(--mp-color-surface, #fff) 72%
            );
        --mp-delivery-map-available:
            color-mix(
                in srgb,
                var(--mp-color-gold, #c79a57) 22%,
                var(--mp-color-surface, #fff) 78%
            );
        --mp-delivery-map-available-stroke:
            color-mix(
                in srgb,
                var(--mp-color-gold, #c79a57) 60%,
                var(--mp-color-surface, #fff) 40%
            );
        --mp-delivery-map-hover:
            color-mix(
                in srgb,
                var(--mp-color-gold, #c79a57) 28%,
                var(--mp-color-surface, #fff) 72%
            );
        --mp-delivery-map-selected:
            var(--mp-color-gold, #c79a57);
        --mp-delivery-map-selected-stroke:
            var(--mp-color-gold-dark, #b8833e);
    }
}

.mp-delivery-country-map__header {
    max-width: 760px;
    margin: 0 auto 22px;
    text-align: center;
}

.mp-delivery-country-map__eyebrow {
    margin: 0 0 7px;
    color: var(--mp-delivery-map-gold);
    font-size: 11px;
    line-height: 1.2;
    font-weight: var(--mp-font-weight-semibold, 600);
    letter-spacing: .2em;
    text-transform: uppercase;
}

.mp-delivery-country-map__heading {
    margin: 0;
    color: var(--mp-delivery-map-ink);
    font-family: var(--mp-font-heading, Georgia, "Times New Roman", serif);
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1.12;
    font-weight: var(--mp-font-weight-regular, 400);
}

.mp-delivery-country-map__intro {
    max-width: 620px;
    margin: 10px auto 0;
    color: var(--mp-delivery-map-muted);
    font-size: 14px;
    line-height: 1.55;
}

.mp-delivery-country-map__layout {
    display: grid;
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
    gap: clamp(18px, 2vw, 32px);
    align-items: start;
}

.mp-delivery-country-map__visual-column {
    min-width: 0;
    order: 2;
}

.mp-delivery-country-map__stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.mp-delivery-country-map__stage::after {
    content: none;
}

.mp-delivery-country-map__stage > svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 590 / 605;
    background: transparent;
}

.mp-delivery-country-map__stage [data-mp-delivery-map-country] {
    outline: none !important;
}

.mp-delivery-map__country {
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-width: .72;
    -webkit-tap-highlight-color: transparent;
    transition:
        fill var(--mp-duration-fast, 180ms) var(--mp-ease, ease),
        opacity var(--mp-duration-fast, 180ms) var(--mp-ease, ease),
        stroke-width var(--mp-duration-fast, 180ms) var(--mp-ease, ease);
}

.mp-delivery-map__country--context {
    fill: var(--mp-delivery-map-context);
    stroke: var(--mp-delivery-map-context-stroke);
    opacity: 1;
}

.mp-delivery-map__country--available {
    cursor: pointer;
    fill: var(--mp-delivery-map-available);
    stroke: var(--mp-delivery-map-available-stroke);
}

.mp-delivery-map__country--available:hover,
.mp-delivery-map__country--available.is-hovered {
    fill: var(--mp-delivery-map-hover);
    stroke: var(--mp-delivery-map-available-stroke);
    stroke-width: 1.15;
}

.mp-delivery-map__country--available.is-active {
    fill: var(--mp-delivery-map-selected);
    stroke: var(--mp-delivery-map-selected-stroke);
    stroke-width: 1.3;
}

.mp-delivery-map__marker {
    cursor: pointer;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.mp-delivery-map__marker.is-unavailable {
    display: none;
}

.mp-delivery-map__leader {
    display: none;
}

.mp-delivery-map__flag-frame {
    fill: #fff;
    fill-opacity: 0;
    stroke: none;
    pointer-events: all;
}

.mp-delivery-map__marker use {
    pointer-events: none;
    transition:
        filter var(--mp-duration-fast, 180ms) var(--mp-ease, ease);
}

.mp-delivery-map__marker:hover use,
.mp-delivery-map__marker.is-hovered use,
.mp-delivery-map__marker:focus-visible use {
    filter:
        drop-shadow(0 0 2px rgba(255, 250, 237, .98))
        drop-shadow(0 0 5px rgba(217, 170, 79, .68));
}

.mp-delivery-map__marker.is-active use {
    filter:
        drop-shadow(0 0 3px rgba(255, 250, 237, 1))
        drop-shadow(0 0 8px rgba(217, 170, 79, .88));
}

.mp-delivery-country-map__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 12px;
    color: var(--mp-delivery-map-muted);
    font-size: 12px;
}

.mp-delivery-country-map__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.mp-delivery-country-map__swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(91, 67, 44, .45);
    border-radius: 50%;
}

.mp-delivery-country-map__swatch--available {
    background: var(--mp-delivery-map-available);
}

.mp-delivery-country-map__swatch--selected {
    background: var(--mp-delivery-map-selected);
    border-color: #fff8e8;
}

.mp-delivery-country-map__swatch--context {
    background: var(--mp-delivery-map-context);
}

.mp-delivery-country-map__panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: start;
    justify-self: start;
    width: 100%;
    max-width: 330px;
    height: fit-content;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--mp-delivery-map-border);
    border-radius: 16px;
    background: var(--mp-delivery-map-surface);
    box-shadow: 0 12px 28px rgba(70, 48, 27, .065);
    order: 1;
}

.mp-delivery-country-map__panel-label {
    margin: 0 0 6px;
    color: var(--mp-delivery-map-gold);
    font-size: 11px;
    line-height: 1.2;
    font-weight: var(--mp-font-weight-semibold, 600);
    letter-spacing: .18em;
    text-transform: uppercase;
}

.mp-delivery-country-map__country-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mp-delivery-country-map__flag {
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.mp-delivery-country-map__flag--heading {
    width: 30px;
    height: 20px;
}

.mp-delivery-country-map__flag--small {
    width: 21px;
    height: 14px;
    opacity: .64;
}

.mp-delivery-country-map__country-name {
    margin: 0;
    color: var(--mp-delivery-map-ink);
    font-family: var(--mp-font-heading, Georgia, "Times New Roman", serif);
    font-size: clamp(25px, 2.1vw, 32px);
    line-height: 1.16;
    font-weight: var(--mp-font-weight-regular, 400);
}

.mp-delivery-country-map__status {
    margin: 9px 0 0;
    color: #5f4938;
    font-size: 14px;
}

.mp-delivery-country-map__zone {
    align-self: flex-start;
    margin-top: 9px;
    padding: 5px 9px;
    border: 1px solid rgba(184, 122, 36, .24);
    border-radius: 999px;
    color: var(--mp-delivery-map-gold);
    background: rgba(220, 184, 111, .11);
    font-size: 11px;
    line-height: 1.2;
}

.mp-delivery-country-map__facts {
    margin: 18px 0 0;
}

.mp-delivery-country-map__facts > div {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(184, 122, 36, .18);
    font-size: 13px;
    line-height: 1.35;
}

.mp-delivery-country-map__facts dt {
    color: var(--mp-delivery-map-muted);
}

.mp-delivery-country-map__facts dd {
    margin: 0;
    color: var(--mp-delivery-map-ink);
    font-weight: var(--mp-font-weight-medium, 500);
    text-align: right;
}

.mp-delivery-country-map__picker {
    margin-top: 18px;
}

.mp-delivery-country-map__picker label {
    display: block;
    margin-bottom: 6px;
    color: var(--mp-delivery-map-muted);
    font-size: 12px;
}

.mp-delivery-country-map__picker select {
    width: 100%;
    min-height: 44px;
    padding: 0 36px 0 12px;
    border: 1px solid rgba(184, 122, 36, .44);
    border-radius: 10px;
    color: var(--mp-delivery-map-ink);
    background-color: var(--mp-delivery-map-surface);
    font: inherit;
}

.mp-delivery-country-map__picker select:focus-visible {
    outline: 2px solid rgba(184, 122, 36, .32);
    outline-offset: 2px;
}

.mp-delivery-country-map__custom-picker {
    position: relative;
    display: none;
}

.mp-delivery-country-map.is-picker-enhanced
    .mp-delivery-country-map__picker select {
    display: none;
}

.mp-delivery-country-map.is-picker-enhanced
    .mp-delivery-country-map__custom-picker {
    display: block;
}

.mp-delivery-country-map__picker-button {
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr) 10px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 13px 0 12px;
    border: 1px solid rgba(184, 122, 36, .44);
    border-radius: 10px;
    color: var(--mp-delivery-map-ink);
    background: var(--mp-delivery-map-surface);
    box-shadow: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mp-delivery-country-map__picker-button:hover,
.mp-delivery-country-map__picker-button[aria-expanded="true"] {
    border-color: var(--mp-delivery-map-gold);
}

.mp-delivery-country-map__picker-button:focus-visible {
    outline: 2px solid rgba(184, 122, 36, .32);
    outline-offset: 2px;
}

.mp-delivery-country-map__picker-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-delivery-country-map__picker-chevron {
    width: 8px;
    height: 8px;
    justify-self: end;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: var(--mp-delivery-map-gold-dark);
    transform: translateY(-2px) rotate(45deg);
    transition:
        transform var(--mp-duration-fast, 180ms) ease;
}

.mp-delivery-country-map__picker-button[aria-expanded="true"]
    .mp-delivery-country-map__picker-chevron {
    transform: translateY(2px) rotate(225deg);
}

.mp-delivery-country-map__picker-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(270px, 45vh);
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--mp-delivery-map-border);
    border-radius: 11px;
    background: var(--mp-delivery-map-surface);
    box-shadow: 0 14px 30px rgba(70, 48, 27, .13);
}

.mp-delivery-country-map__picker-list[hidden] {
    display: none;
}

.mp-delivery-country-map__picker-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 7px 9px;
    border: 0;
    border-radius: 7px;
    color: var(--mp-delivery-map-ink);
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mp-delivery-country-map__picker-option:hover,
.mp-delivery-country-map__picker-option:focus-visible {
    outline: none;
    background: #f7efe3;
}

.mp-delivery-country-map__picker-option.is-active {
    color: var(--mp-delivery-map-ink);
    background: #f2e4cf;
    font-weight: var(--mp-font-weight-medium, 500);
}

.mp-delivery-country-map__picker-option.is-active
    .mp-delivery-country-map__flag--small {
    opacity: .76;
}

@supports (color: color-mix(in srgb, black, white)) {
    .mp-delivery-country-map__picker-option:hover,
    .mp-delivery-country-map__picker-option:focus-visible {
        background:
            color-mix(
                in srgb,
                var(--mp-delivery-map-gold) 12%,
                var(--mp-delivery-map-surface) 88%
            );
    }

    .mp-delivery-country-map__picker-option.is-active {
        background:
            color-mix(
                in srgb,
                var(--mp-delivery-map-gold) 20%,
                var(--mp-delivery-map-surface) 80%
            );
    }
}

.mp-delivery-country-map__test-note {
    margin: 12px 0 0;
    color: #9a8570;
    font-size: 11px;
    line-height: 1.45;
}

.mp-delivery-country-map__test-note[hidden] {
    display: none;
}

@media (min-width: 761px) {
    .mp-delivery-country-map__panel {
        position: sticky;
        top:
            calc(
                var(--mp-site-header-sticky-offset-desktop, 80px)
                + 16px
            );
    }
}

@media (max-width: 980px) {
    .mp-delivery-country-map__layout {
        grid-template-columns:
            minmax(250px, 300px)
            minmax(0, 1fr);
        gap: 14px;
    }

    .mp-delivery-country-map__panel {
        max-width: 300px;
        padding: 20px;
    }
}

@media (max-width: 760px) {
    .mp-delivery-country-map__header {
        margin-bottom: 16px;
    }

    .mp-delivery-country-map__layout {
        grid-template-columns: 1fr;
    }

    .mp-delivery-country-map__visual-column {
        order: 1;
    }

    .mp-delivery-country-map__panel {
        order: 2;
        justify-self: stretch;
        max-width: none;
        border-radius: 14px;
    }

    /*
     * Full-width SVG area on mobile.
     * Header, legend and information panel retain page spacing.
     */
    .mp-delivery-country-map__stage {
        width: 100vw;
        max-width: 100vw;
        margin-inline: calc(50% - 50vw);
        aspect-ratio: 590 / 605;
    }

    .mp-delivery-country-map__stage > svg {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        transform: none;
    }

    .mp-delivery-country-map__panel {
        padding: 19px;
    }

    .mp-delivery-country-map__legend {
        gap: 8px 12px;
        font-size: 11px;
    }

    .mp-delivery-map__country {
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-delivery-map__country,
    .mp-delivery-map__marker use {
        transition: none;
    }
}