/* =============================================
   FlexCurr — Currency Dropdown Switcher
   Branding: maroon #7B2D2D, cream #F5F0E4
   RTL-aware
   ============================================= */

.flexcurr-dropdown {
    position: relative;
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    direction: ltr; /* keep internal layout consistent regardless of page dir */
}

/* ── Toggle button ─────────────────────────── */
.flexcurr-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px 6px 10px;
    background: #fff;
    border: 1.5px solid #d9cfc4;
    border-radius: 6px;
    cursor: pointer;
    color: #3a2a1a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    outline: none;
}

.flexcurr-dropdown__toggle:hover {
    border-color: #7B2D2D;
    background: #fdf8f2;
    box-shadow: 0 2px 8px rgba(123, 45, 45, 0.10);
}

.flexcurr-dropdown__toggle:focus-visible {
    border-color: #7B2D2D;
    box-shadow: 0 0 0 3px rgba(123, 45, 45, 0.18);
}

/* When open */
.flexcurr-dropdown.is-open .flexcurr-dropdown__toggle {
    border-color: #7B2D2D;
    background: #fdf8f2;
    box-shadow: 0 2px 8px rgba(123, 45, 45, 0.12);
}

.flexcurr-dropdown.is-open .flexcurr-dropdown__chevron {
    transform: rotate(180deg);
}

/* ── Shared icon styles ────────────────────── */
.flexcurr-dropdown__flag {
    font-size: 15px;
    line-height: 1;
}

.flexcurr-dropdown__label {
    font-weight: 700;
    color: #3a2a1a;
}

.flexcurr-dropdown__symbol {
    color: #7B2D2D;
    font-weight: 600;
}

.flexcurr-dropdown__chevron {
    color: #7B2D2D;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* ── Dropdown menu ─────────────────────────── */
.flexcurr-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    z-index: 99999;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 148px;
    background: #fff;
    border: 1.5px solid #e8ddd2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(60, 30, 10, 0.13), 0 2px 6px rgba(60, 30, 10, 0.07);
    overflow: hidden;
    animation: flexcurr-fadein 0.15s ease;
}

/* RTL sites: open menu to the left instead */
[dir="rtl"] .flexcurr-dropdown__menu {
    right: auto;
    left: 0;
}

.flexcurr-dropdown.is-open .flexcurr-dropdown__menu {
    display: block;
}

@keyframes flexcurr-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Menu items ────────────────────────────── */
.flexcurr-dropdown__menu li {
    margin: 0;
    padding: 0;
}

.flexcurr-dropdown__option {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #3a2a1a;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s;
    outline: none;
}

.flexcurr-dropdown__option:hover {
    background: #fdf3ec;
}

.flexcurr-dropdown__option:focus-visible {
    background: #fdf3ec;
    outline: 2px solid #7B2D2D;
    outline-offset: -2px;
}

/* Active/selected option */
.flexcurr-dropdown__option.is-active {
    background: #f9ece7;
    color: #7B2D2D;
}

.flexcurr-dropdown__option.is-active .flexcurr-dropdown__label {
    color: #7B2D2D;
}

.flexcurr-dropdown__option.is-active .flexcurr-dropdown__symbol {
    color: #9b3a3a;
}

/* Push checkmark to the end */
.flexcurr-dropdown__check {
    margin-inline-start: auto;
    color: #7B2D2D;
    flex-shrink: 0;
}

/* Divider between options (optional, via :not(:last-child)) */
.flexcurr-dropdown__menu li:not(:last-child) .flexcurr-dropdown__option {
    border-bottom: 1px solid #f3ede6;
}
