/* ═══════════════════════════════════════════════════════════
   DOUBLEEW Currency Selector — v1.0.0
   All selectors prefixed with .dwcs- to avoid conflicts.
   ═══════════════════════════════════════════════════════════ */

/* ─── Overlay ───────────────────────────────────────────── */
.dwcs-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dwcs-overlay.dwcs-visible {
    opacity: 1;
}

/* ─── Popup Card ────────────────────────────────────────── */
.dwcs-popup {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    border-radius: 2px;
    padding: 40px 32px 32px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.dwcs-overlay.dwcs-visible .dwcs-popup {
    transform: translateY(0);
}

/* ─── Header ────────────────────────────────────────────── */
.dwcs-popup__header {
    text-align: center;
    margin-bottom: 28px;
}
.dwcs-popup__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #000;
    margin-bottom: 8px;
}
.dwcs-popup__subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

/* ─── Country Buttons ───────────────────────────────────── */
.dwcs-popup__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dwcs-country-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}
.dwcs-country-btn:hover,
.dwcs-country-btn:focus-visible {
    background: #000;
    border-color: #000;
}
.dwcs-country-btn:hover .dwcs-country-btn__name,
.dwcs-country-btn:focus-visible .dwcs-country-btn__name {
    color: #fff;
}
.dwcs-country-btn:hover .dwcs-country-btn__currency,
.dwcs-country-btn:focus-visible .dwcs-country-btn__currency {
    color: rgba(255, 255, 255, 0.6);
}
.dwcs-country-btn__flag {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.dwcs-country-btn__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dwcs-country-btn__name {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    transition: color 0.2s ease;
}
.dwcs-country-btn__currency {
    font-size: 12px;
    color: #999;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

/* ─── Floating Switcher (bottom-right) ──────────────────── */
.dwcs-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.dwcs-switcher__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #111;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    font-family: inherit;
}
.dwcs-switcher__btn:hover {
    border-color: #000;
}
.dwcs-switcher__btn svg {
    transition: transform 0.2s ease;
}
.dwcs-switcher.dwcs-open .dwcs-switcher__btn svg {
    transform: rotate(180deg);
}

/* ─── Dropdown ──────────────────────────────────────────── */
.dwcs-switcher__dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 140px;
}
.dwcs-switcher__option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    text-align: left;
    transition: background 0.15s ease;
    font-family: inherit;
}
.dwcs-switcher__option:last-child {
    border-bottom: none;
}
.dwcs-switcher__option:hover {
    background: #f5f5f5;
}
.dwcs-switcher__option.dwcs-active {
    font-weight: 600;
    color: #000;
}

/* ─── Animations ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .dwcs-overlay,
    .dwcs-popup,
    .dwcs-country-btn,
    .dwcs-switcher__btn,
    .dwcs-switcher__btn svg {
        transition: none;
    }
}

/* ─── Mobile tweaks ─────────────────────────────────────── */
@media (max-width: 480px) {
    .dwcs-popup {
        padding: 32px 24px 24px;
    }
    .dwcs-switcher {
        bottom: 14px;
        left: 14px;
    }
}
