/* ────────────────────────────────────────────────────────────
   Header currency picker: flag (left) + aligned "CODE | symbol".
   Drives a hidden native .curSel <select> so the existing
   change handler (AJAX + live price update) keeps working.
   ──────────────────────────────────────────────────────────── */

.cur-pick { position: relative; display: inline-block; vertical-align: middle; }

/* hidden but functional native select (keeps .curSel change logic) */
.cur-pick__native {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cur-pick__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36.6px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}
.cur-pick__flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.cur-pick__label { font-weight: 600; letter-spacing: .02em; }
.cur-pick__caret { font-size: 14px; opacity: .8; transition: transform .15s; }
.cur-pick.is-open .cur-pick__caret { transform: rotate(180deg); }

.cur-pick__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    /* above the fixed AI chat widget (#aiChatSection, z-index:1030) so it isn't covered */
    z-index: 1050;
    min-width: 150px;
    /* grow with the list: at least 500px, up to half the screen on tall screens */
    max-height: max(500px, 50vh);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
    display: none;
}
/* WebKit scrollbar only — intentionally NO standard scrollbar-width/color: Chrome 121+
   honours those and then ignores ::-webkit-scrollbar, falling back to the OS theme
   (which on Linux draws arrow buttons that can't be removed). The WebKit path keeps
   full control: thin, faint, solid on hover, and no arrow buttons. */
.cur-pick__panel::-webkit-scrollbar { width: 5px; }
.cur-pick__panel::-webkit-scrollbar-button { display: none !important; width: 0 !important; height: 0 !important; }
.cur-pick__panel::-webkit-scrollbar-track { background: transparent; }
.cur-pick__panel::-webkit-scrollbar-thumb { background: rgba(90, 97, 114, .4); border-radius: 8px; }
/* toggled by JS on list hover (WebKit won't repaint the thumb on a parent :hover) */
.cur-pick__panel.is-scroll-hover::-webkit-scrollbar-thumb { background: rgba(90, 97, 114, 1); }

/* short screens: allow up to the full screen height (still at least 500px) */
@media (max-height: 600px) {
    .cur-pick__panel { max-height: max(500px, 100vh); }
}
.cur-pick.is-open .cur-pick__panel { display: block; }

/* Burger menu: the trigger sits on the left, so open the panel to the right with a small
   left offset — never flush against (or pushed off) the left edge. */
@media (max-width: 1199px) {
    .cur-pick__panel { left: 12px; right: auto; }
}

/* aligned columns: flag | code | divider | symbol */
.cur-pick__opt {
    display: grid;
    /* fixed columns so they line up across every row; the whole group is centered */
    grid-template-columns: 20px 38px 12px 44px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #2a2f45;
    font-size: 13.5px;
}
.cur-pick__opt:hover { background: #f3f6ff; }
.cur-pick__opt.is-active { background: #eef4ff; }
.cur-pick__code { font-weight: 700; text-transform: uppercase; text-align: left; }
.cur-pick__div { color: #e6e9f0; text-align: center; }
.cur-pick__sym { color: #5b6172; text-align: left; }
