/* ============================================================
   AQUARIUS RED SEA — Currency Converter Widget
   ------------------------------------------------------------
   Floating button at bottom-right that lets visitors switch
   between GBP, EUR, USD. Matches existing floating buttons
   (60x60 circular, primary blue, positioned above booking).
   
   Dependencies: 
   - --primary, --primary-dark, --accent, --text-dark, --text-light
     CSS variables must be defined in the host page
   - Sits at bottom: 200px (above booking at bottom: 130px)
   ============================================================ */

/* ── The floating button ─────────────────────────────────── */
.currency-float {
    position: fixed;
    bottom: 200px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    user-select: none;
    border: none;
    font-family: inherit;
    text-decoration: none !important;
}
.currency-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: var(--primary-dark);
    text-decoration: none !important;
}
.currency-float:active {
    transform: scale(0.95);
}
.currency-float .current-currency-symbol {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
}

/* ── The expanded panel ──────────────────────────────────── */
.currency-panel {
    position: fixed;
    bottom: 270px;   /* 200 (button) + 60 (height) + 10 (gap) */
    right: 20px;
    min-width: 130px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 999;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.currency-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f3f5;
    background: #fff;
    width: 100%;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none !important;
}
.currency-option:last-child {
    border-bottom: none;
}
.currency-option:hover {
    background: var(--accent);
    text-decoration: none !important;
}
.currency-option.active {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
}
.currency-option.active::after {
    content: '✓';
    margin-left: auto;
    color: var(--primary);
    font-weight: bold;
}
.currency-symbol {
    font-size: 1.15rem;
    font-weight: 700;
    width: 18px;
    text-align: center;
    color: var(--primary);
}
.currency-code {
    font-size: 0.85rem;
    color: var(--text-dark);
    letter-spacing: 0.02em;
    flex: 1;
}
.currency-option.active .currency-code {
    color: var(--primary);
}

/* ── Price-change flash animation ────────────────────────── */
[data-price][data-currency] {
    transition: color 0.3s ease;
}
[data-price][data-currency].changing {
    animation: currencyPriceFlash 0.35s ease;
}
@keyframes currencyPriceFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Mobile (≤600px) ─────────────────────────────────────── */
@media (max-width: 600px) {
    .currency-float {
        bottom: 195px;  /* Slightly tighter on mobile */
        right: 18px;
    }
    .currency-panel {
        bottom: 265px;
        right: 18px;
    }
}
