/*--------------------------------------------------------------
# Currency Toggle — Compact Pill Switcher
# Branded ARS / USD toggle that replaces the verbose YayCurrency
# dropdown. Used on product pages and checkout.
#
# @package TicketSystemTango
--------------------------------------------------------------*/


/* ==========================================================================
   §1  TOGGLE CONTAINER
   Rounded pill with a sliding active indicator
   ========================================================================== */

.ts-currency-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 100px;
    padding: 3px;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ts-currency-toggle:hover {
    border-color: rgba(201, 169, 110, 0.45);
}

.ts-currency-toggle:focus-within {
    border-color: rgba(201, 169, 110, 0.5);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}


/* ==========================================================================
   §2  TOGGLE BUTTONS
   Each currency option
   ========================================================================== */

.ts-currency-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px !important;
    border: none !important;
    border-radius: 100px !important;
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-family: var(--font-body);
    font-size: 0.78rem !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none !important;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1;
    position: relative;
    z-index: 1;
    box-shadow: none !important;
    transform: none !important;
    min-height: auto !important;
}

.ts-currency-toggle__btn:hover:not(.ts-currency-toggle__btn--active) {
    color: rgba(255, 255, 255, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    transform: none !important;
    box-shadow: none !important;
}

.ts-currency-toggle__btn:active {
    transform: none !important;
    box-shadow: none !important;
}

.ts-currency-toggle__btn:focus-visible {
    outline: 2px solid var(--ts-gold, #c9a96e);
    outline-offset: 1px;
    box-shadow: none !important;
}


/* ==========================================================================
   §3  ACTIVE STATE
   Gold background pill for the selected currency
   ========================================================================== */

.ts-currency-toggle__btn.ts-currency-toggle__btn--active {
    background-color: var(--ts-gold, #c9a96e) !important;
    color: #111111 !important;
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.3) !important;
    cursor: default;
}

.ts-currency-toggle__btn.ts-currency-toggle__btn--active:hover {
    background-color: var(--ts-gold, #c9a96e) !important;
    color: #111111 !important;
    transform: none !important;
}

/* Flag emoji sizing */
.ts-currency-toggle__flag {
    font-size: 1rem;
    line-height: 1;
}


/* ==========================================================================
   §4  LOADING STATE
   Subtle pulse animation while the currency switch is being processed
   ========================================================================== */

.ts-currency-toggle--loading {
    pointer-events: none;
    opacity: 0.7;
    animation: ts-toggle-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes ts-toggle-pulse {
    from { opacity: 0.5; }
    to   { opacity: 0.9; }
}


/* ==========================================================================
   §5  PRODUCT PAGE — TICKET PANEL FOOTER PLACEMENT
   Inside the sticky footer bar on single product pages
   ========================================================================== */

.ts-product-currency-switcher {
    margin: 0;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .ts-product-currency-switcher {
        order: -1;
    }
}


/* ==========================================================================
   §6  CHECKOUT CONTEXT
   Currency indicator + toggle inside the checkout mobile summary bar
   and payment hint area
   ========================================================================== */

.ts-checkout-currency {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ts-checkout-currency__hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    letter-spacing: 0.02em;
}

.ts-checkout-currency__hint strong {
    color: var(--ts-gold, #c9a96e);
    font-weight: 600;
}


/* ==========================================================================
   §7  PAYMENT METHOD HINT STRIP
   Contextual banner explaining currency ↔ payment method link
   ========================================================================== */

.ts-payment-currency-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.ts-payment-currency-hint__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.ts-payment-currency-hint__text strong {
    color: #ffffff;
    font-weight: 600;
}

.ts-payment-currency-hint__change {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--ts-gold, #c9a96e);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
    padding: 0;
}

.ts-payment-currency-hint__change:hover {
    color: #ffffff;
}

@media (max-width: 480px) {
    .ts-payment-currency-hint {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
    }

    .ts-payment-currency-hint__change {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding-top: 8px;
        border-top: 1px solid rgba(201, 169, 110, 0.15);
    }
}
