/* Header currency picker: a pill button that opens a rounded, framed list */
.currency-switch { position: relative; }
.currency-switch-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #17324d; font-size: 12px; font-weight: 800; letter-spacing: .04em; cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.currency-switch-btn:hover, .currency-switch-btn[aria-expanded="true"] { border-color: #28b5a4; color: #17786c; }
.currency-switch-btn:focus-visible { outline: 2px solid #28b5a4; outline-offset: 2px; }
.currency-switch-caret { font-size: 9px; color: #8a97a6; transition: transform .2s; }
.currency-switch-btn[aria-expanded="true"] .currency-switch-caret { transform: rotate(180deg); }

.currency-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 270px; padding: 8px; border: 1px solid #e1ebe7; border-radius: 22px; background: #fff; box-shadow: 0 24px 48px -16px rgba(23, 50, 77, .35), 0 2px 6px rgba(23, 50, 77, .06); color: #17324d; text-align: left; letter-spacing: 0; text-transform: none; }
.currency-menu[hidden] { display: none; }
.currency-menu-title { margin: 0; padding: 8px 12px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #17786c; }
.currency-menu-list { display: grid; gap: 2px; max-height: min(340px, 55vh); overflow-y: auto; padding: 2px; overscroll-behavior: contain; scrollbar-width: thin; }
.currency-menu-list button { display: grid; grid-template-columns: 44px 1fr 16px; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 14px; background: transparent; color: #33465f; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color .15s; }
.currency-menu-list button:hover, .currency-menu-list button:focus-visible { background: #f3f8f6; outline: none; }
.currency-menu-code { display: inline-flex; align-items: center; justify-content: center; height: 26px; border-radius: 8px; background: #f3f8f6; box-shadow: inset 0 0 0 1px #e1ebe7; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #17324d; }
.currency-menu-check { font-size: 12px; color: #17786c; opacity: 0; }
.currency-menu-list button[aria-selected="true"] { background: #e4f3ee; color: #17324d; font-weight: 700; }
.currency-menu-list button[aria-selected="true"] .currency-menu-code { background: #17786c; box-shadow: none; color: #fff; }
.currency-menu-list button[aria-selected="true"] .currency-menu-check { opacity: 1; }
.currency-menu-foot { display: flex; gap: 6px; margin: 6px 4px 2px; padding: 10px 10px 4px; border-top: 1px dashed #dfe9e5; font-size: 11px; line-height: 1.45; color: #6b7a8c; }
.currency-menu-foot i { margin-top: 2px; color: #17786c; }

/* Note shown next to quotes when a currency other than USD is selected */
.currency-note { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; font-weight: 500; color: #6b7a8c; }
.currency-note[hidden] { display: none; }
.currency-note i { margin-top: 2px; color: #17786c; }

/* Homepage glass header: the pill turns translucent until the header becomes solid */
body.home-overlay .site-header:not(.is-solid) .currency-switch-btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #fff; }
body.home-overlay .site-header:not(.is-solid) .currency-switch-caret { color: rgba(255, 255, 255, .75); }

@media (max-width: 767px) {
    .currency-switch-btn { height: 36px; padding: 0 10px; font-size: 11px; }
    /* On phones the list spans the screen width just below the header */
    .currency-menu { position: fixed; top: var(--currency-menu-top, 72px); left: 12px; right: 12px; width: auto; }
}
