/* Desert Stories – Currency switcher (Toggle: Soft segmented, approved variant 01).
   WCML handles currency changes. This stylesheet only controls presentation. */
.desert-currency-switcher {
    --db-currency-active: #2f4f33;
    --db-currency-text: #2e4635;
    --db-currency-surface: #f8faf8;
    --db-currency-border: rgba(47, 79, 51, .15);
    display: inline-flex;
    position: relative;
    width: max-content;
    max-width: 100%;
    vertical-align: middle;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--db-currency-text);
}
.desert-currency-switcher,
.desert-currency-switcher *,
.desert-currency-switcher *::before,
.desert-currency-switcher *::after { box-sizing: border-box; }

/* Natywna kontrolka WCML musi pozostać w DOM z działającymi eventami. */
.desert-currency-switcher__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}
.desert-currency-switcher__flag {
    display: block;
    width: 17px;
    height: 17px;
    object-fit: contain;
    flex: 0 0 17px;
    margin: 0;
    border: 0;
    box-shadow: none;
}
.desert-currency-switcher__code {
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    line-height: 1;
}

/* Toggle 01: Soft segmented – faithful to the approved HTML preview. */
.desert-currency-switcher__segments {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 3px;
    border: 1px solid #e5eae3;
    border-radius: 10px;
    background: #f0f3ee;
    box-shadow: none;
}
.desert-currency-switcher__option {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    margin: 0 !important;
    padding: 7px 11px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--db-currency-text) !important;
    cursor: pointer;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}
.desert-currency-switcher__option.is-active,
.desert-currency-switcher__option.is-active:disabled {
    background: var(--db-currency-active) !important;
    color: #fff !important;
    opacity: 1 !important;
    cursor: default;
}
.desert-currency-switcher__option:not(.is-active):hover {
    background: rgba(47, 79, 51, .065) !important;
}
.desert-currency-switcher__option:focus-visible,
.desert-currency-switcher__summary:focus-visible {
    outline: 2px solid var(--db-currency-active);
    outline-offset: 3px;
}

/* Toggle-specific dimensions and palette. These are intentional exact values
   from the approved Soft segmented design; dropdown retains its own styling. */
.desert-currency-switcher--toggle {
    color: #526056;
    font-size: 13px;
    font-weight: 600;
}
.desert-currency-switcher--toggle .desert-currency-switcher__segments {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 3px;
    background: #f0f3ee;
    border: 1px solid #e5eae3;
    border-radius: 10px;
    box-shadow: none;
}
.desert-currency-switcher--toggle .desert-currency-switcher__segments .desert-currency-switcher__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 68px;
    min-height: 33px;
    padding: 10px 14px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #526056 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}
.desert-currency-switcher--toggle .desert-currency-switcher__segments .desert-currency-switcher__option.is-active,
.desert-currency-switcher--toggle .desert-currency-switcher__segments .desert-currency-switcher__option.is-active:disabled {
    background: #fff !important;
    color: #203c2b !important;
    box-shadow: 0 1px 4px #253d2a12 !important;
    opacity: 1 !important;
}
.desert-currency-switcher--toggle .desert-currency-switcher__segments .desert-currency-switcher__option:not(.is-active):hover {
    background: rgba(255,255,255,.45) !important;
    color: #203c2b !important;
}
.desert-currency-switcher--toggle .desert-currency-switcher__segments .desert-currency-switcher__flag {
    width: 17px;
    height: 13px;
    flex: 0 0 17px;
    object-fit: cover;
    border-radius: 2px;
}

/* Dropdown: ta sama gęstość, płaski panel i subtelny separator. */
.desert-currency-switcher__dropdown {
    position: relative;
    min-width: 112px;
}
.desert-currency-switcher__summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--db-currency-border);
    border-radius: 999px;
    background: var(--db-currency-surface);
    box-shadow: none;
    color: var(--db-currency-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}
.desert-currency-switcher__summary::-webkit-details-marker { display: none; }
.desert-currency-switcher__chevron {
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.desert-currency-switcher__options {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    min-width: 100%;
    padding: 4px;
    border: 1px solid var(--db-currency-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(25, 42, 26, .09);
}
.desert-currency-switcher__dropdown .desert-currency-switcher__option {
    display: flex;
    width: 100%;
    min-height: 32px;
    justify-content: flex-start;
    padding: 7px 9px !important;
    border-radius: 8px !important;
}
.desert-currency-switcher__dropdown .desert-currency-switcher__option.is-active {
    background: rgba(47, 79, 51, .09) !important;
    color: var(--db-currency-text) !important;
}
@media (max-width: 375px) {
    /* Keep the approved toggle proportions on mobile. */
    .desert-currency-switcher--dropdown .desert-currency-switcher__option { padding: 7px 9px !important; }
    .desert-currency-switcher--dropdown .desert-currency-switcher__flag { width: 16px; height: 16px; flex-basis: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .desert-currency-switcher__option { transition: none; }
}
