/**
 * SnapTrip Currency Switcher (header shortcode)
 *
 * Themes style bare <button> elements aggressively (Astra, Hello, Matour and
 * most Elementor kits all do), which previously bled a green background, pill
 * radius and extra padding into this component. Everything here is therefore
 * reset explicitly and scoped to .st-currency-* rather than inheriting, and the
 * few properties a theme is most likely to override carry !important.
 */

/* ---------- Reset: neutralise theme button styling ---------- */
.st-currency-switcher button,
.st-currency-inline button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0 !important;
    font-family: inherit;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    box-shadow: none !important;
    background-image: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: auto;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.st-currency-switcher button:hover,
.st-currency-switcher button:focus,
.st-currency-inline button:hover,
.st-currency-inline button:focus {
    box-shadow: none !important;
    background-image: none !important;
    transform: none !important;
}

/* ---------- Dropdown style (default) ---------- */
.st-currency-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1;
}

.st-currency-label {
    opacity: 0.85;
    font-size: 13px;
}

.st-currency-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 8px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: #FFFFFF !important;
    background-color: #123B5D !important;
    border: 0 !important;
    border-radius: 999px !important;
}

.st-currency-toggle:hover,
.st-currency-toggle:focus-visible {
    background-color: #1B4E77 !important;
    color: #FFFFFF !important;
}

/* Custom label text sits left of the currency code. The code is dimmed
   slightly so the label reads as the primary text. */
.st-currency-text {
    font-weight: 600;
}

.st-currency-current {
    font-weight: 600;
    opacity: 0.82;
}

.st-currency-text + .st-currency-current {
    padding-left: 8px;
    margin-left: 1px;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.st-currency-caret {
    flex: 0 0 auto;
    transition: transform 0.15s ease;
}

.st-currency-toggle[aria-expanded="true"] .st-currency-caret {
    transform: rotate(180deg);
}

/* ---------- Dropdown panel ---------- */
.st-currency-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 168px;
    margin: 0 !important;
    padding: 6px !important;
    list-style: none !important;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16, 32, 56, 0.16);
}

.st-currency-menu[hidden] { display: none; }

.st-currency-menu li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: 0 !important;
}

/* Rows are square-ish and full width, not pills. The pill radius plus the
   theme's button padding was what made these look like they overlapped. */
.st-currency-option {
    display: flex !important;
    align-items: center;
    gap: 4px;
    width: 100% !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    color: #123B5D !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
}

.st-currency-option:hover,
.st-currency-option:focus-visible {
    background-color: #EEF2F7 !important;
    color: #123B5D !important;
}

.st-currency-option.is-active {
    background-color: #123B5D !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

.st-currency-option.is-active:hover {
    background-color: #1B4E77 !important;
    color: #FFFFFF !important;
}

.st-currency-option-symbol {
    flex: 0 0 38px;
    font-weight: 600;
    opacity: 0.8;
}

.st-currency-option.is-active .st-currency-option-symbol { opacity: 0.95; }

/* ---------- Inline pill style ---------- */
.st-currency-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.st-currency-inline-label {
    opacity: 0.85;
    margin-right: 2px;
}

.st-currency-pill {
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: #123B5D !important;
    background-color: transparent !important;
    border: 1px solid #C7D3E0 !important;
    border-radius: 999px !important;
}

.st-currency-pill:hover {
    background-color: #EEF2F7 !important;
    color: #123B5D !important;
}

.st-currency-pill.is-active {
    background-color: #123B5D !important;
    border-color: #123B5D !important;
    color: #FFFFFF !important;
}

/* ---------- Loading state ---------- */
.st-currency-switcher.is-loading,
.st-currency-inline.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .st-currency-toggle { padding: 7px 12px !important; font-size: 13px !important; }
    .st-currency-menu   { right: auto; left: 0; }
}
