/*
 * Styles for the language picker and the pricing-page currency picker.
 * This MUST be an external file, not an inline <style> block — the
 * site's CSP sets `style-src-elem 'self' https://fonts.googleapis.com`
 * with no 'unsafe-inline', so any inline <style> tag is silently
 * dropped by the browser. Inline `style="..."` attributes are allowed
 * separately (`style-src-attr 'unsafe-inline'`), which is why the flag
 * image sizing worked even before this file existed, but nothing else
 * (backgrounds, hover states, ::-webkit-scrollbar, [open] state) did.
 */

/* ---------- Shared: flag images ---------- */

.language-picker-flag-img,
.currency-picker-flag-img {
    display: inline-block;
    width: 16px;
    height: 11px;
    max-width: 16px;
    max-height: 11px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ---------- Shared: thin themed scrollbar ---------- */

.language-picker-menu,
.currency-picker-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.language-picker-menu::-webkit-scrollbar,
.currency-picker-menu::-webkit-scrollbar {
    width: 8px;
}

.language-picker-menu::-webkit-scrollbar-track,
.currency-picker-menu::-webkit-scrollbar-track {
    background: transparent;
}

.language-picker-menu::-webkit-scrollbar-thumb,
.currency-picker-menu::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.language-picker-menu::-webkit-scrollbar-thumb:hover,
.currency-picker-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.65);
}

/* ---------- Currency picker (mirrors the language picker component) ---------- */

.currency-picker-wrap .currency-picker-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
}

.currency-picker {
    position: relative;
}

.currency-picker summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    cursor: pointer;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.07);
    color: var(--text, #f8fafc);
    width: fit-content;
}

.currency-picker summary:hover,
.currency-picker[open] summary {
    border-color: rgba(56, 189, 248, 0.48);
    background: rgba(56, 189, 248, 0.11);
}

.currency-picker summary::-webkit-details-marker {
    display: none;
}

.currency-picker-chevron {
    width: 14px;
    height: 14px;
    color: var(--muted, #94a3b8);
    transition: transform 0.2s ease;
}

.currency-picker[open] .currency-picker-chevron {
    transform: rotate(180deg);
}

.currency-picker-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 150px;
    padding: 0.35rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #111827;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.45);
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
}

.currency-picker-menu form {
    margin: 0;
}

.currency-picker-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #dbe5f5;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.currency-picker-option:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #fff;
}

.currency-picker-option.is-active {
    background: rgba(56, 189, 248, 0.16);
}

.currency-picker-check {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: #38bdf8;
}

html[data-theme="light"] .currency-picker-menu {
    border-color: rgba(15, 23, 42, 0.14);
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .currency-picker-option {
    color: #26334a;
}

html[dir="rtl"] .currency-picker-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .currency-picker-check {
    margin-left: 0;
    margin-right: auto;
}
