/* [2026-08-04] [CSS, Rates & Licensing, O(1), Mobile+Desktop, Bilingual] - Organized by Gemini */

/* ═══════════════════════════════════════════════════════════════════
   RATES TOP BAR — Mobile scroll-trigger & Desktop pulse-loop
   ═══════════════════════════════════════════════════════════════════ */

.rates-spacer-box {
    width: 100%;
    margin: 0 0 1rem 0;
    padding: 1.1rem 1.5rem;
    min-height: 64px;
    background: rgba(10, 8, 18, 0.88);
    border: 2px solid rgba(0, 168, 255, 0.6);
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(0, 168, 255, 0.25), inset 0 0 10px rgba(255, 0, 170, 0.1);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
    position: relative;
    overflow: hidden;
    order: -1; /* sits above other right-panel children */
}

.rates-spacer-box::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00a8ff, #ff00aa, #00a8ff, transparent);
    background-size: 200% 100%;
    animation: ratesGradientShift 3.5s linear infinite;
}

.rates-spacer-box:hover {
    border-color: #00a8ff;
    box-shadow: 0 0 28px rgba(0, 168, 255, 0.55), inset 0 0 18px rgba(0, 168, 255, 0.15);
    transform: scale(1.02) translateY(-2px);
}

.rates-glitch-text {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 3px;
    text-shadow: -2px 0 0 #ff00aa, 2px 0 0 #00a8ff, 0 0 10px rgba(0, 168, 255, 0.7);
    position: relative;
    display: inline-block;
    animation: ratesHyperGlitch 2.2s infinite linear;
}

@keyframes ratesHyperGlitch {
    0%, 85%, 100% {
        transform: translate3d(0, 0, 0);
        text-shadow: -2px 0 0 #ff00aa, 2px 0 0 #00a8ff, 0 0 10px rgba(0, 168, 255, 0.7);
        color: #ffffff;
    }
    87% {
        transform: translate3d(-3px, 1px, 0) skewX(-4deg);
        text-shadow: -3px 0 0 #00a8ff, 3px 0 0 #ff00aa, 0 0 18px #ffffff;
        color: #00a8ff;
    }
    89% {
        transform: translate3d(3px, -2px, 0) skewX(4deg);
        text-shadow: 2px 0 0 #ffd700, -2px 0 0 #39ff14;
        color: #ffffff;
    }
    93% {
        transform: translate3d(1px, 0, 0);
        color: #ff00aa;
    }
}

@keyframes ratesGradientShift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ═══════════════════════════════════════════════════════════════════
   RATES FULL-SCREEN OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

#rates-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 3, 12, 0.88);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 99998;
}
#rates-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════
   RATES PANEL (the sliding drawer)
   ═══════════════════════════════════════════════════════════════════ */

#rates-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%) scale(0.9);
    width: 94%;
    max-width: 820px;
    max-height: 88vh;
    background: rgba(12, 10, 22, 0.97);
    border: 2px solid rgba(0, 168, 255, 0.7);
    border-radius: 18px;
    box-shadow: 0 0 60px rgba(0, 168, 255, 0.35), 0 30px 90px rgba(0, 0, 0, 0.9);
    padding: 2rem 2rem 1.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
}
#rates-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* top line accent */
#rates-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00a8ff, #ff00aa, #ffd700, transparent);
    background-size: 200% 100%;
    animation: ratesGradientShift 3s linear infinite;
}
/* bottom separator line (mirrors booking bar's top accent) */
#rates-panel::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00a8ff, #ff00aa, #00a8ff, transparent);
    background-size: 200% 100%;
    animation: ratesGradientShift 3.5s linear infinite reverse;
}

.rates-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-right: 30px;
    font-family: 'Consolas', 'Courier New', monospace;
}

.rates-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00a8ff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rates-pulse-dot {
    width: 9px;
    height: 9px;
    background: #00a8ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00a8ff, 0 0 18px #00a8ff;
    animation: ratesDotPulse 1.6s infinite alternate;
}

@keyframes ratesDotPulse {
    0%   { transform: scale(0.85); box-shadow: 0 0 5px #00a8ff; }
    100% { transform: scale(1.2);  box-shadow: 0 0 14px #00a8ff, 0 0 28px #ff00aa; }
}

.rates-close-btn {
    position: absolute;
    top: 18px; right: 20px;
    font-size: 2.1rem;
    color: #00a8ff;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}
.rates-close-btn:hover {
    color: #ff00aa;
    transform: scale(1.15) rotate(90deg);
    text-shadow: 0 0 14px #ff00aa;
}

/* ═══════════════════════════════════════════════════════════════════
   BACK BUTTON (Level 2 → Level 1)
   ═══════════════════════════════════════════════════════════════════ */

.rates-back-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(0, 168, 255, 0.4);
    color: #00a8ff;
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.rates-back-btn:hover {
    background: rgba(0, 168, 255, 0.12);
    border-color: #00a8ff;
    text-shadow: 0 0 8px #00a8ff;
}
.rates-back-btn.visible { display: flex; }

/* ═══════════════════════════════════════════════════════════════════
   SCROLLABLE CONTENT AREA
   ═══════════════════════════════════════════════════════════════════ */

.rates-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 255, 0.4) transparent;
}
.rates-scroll-body::-webkit-scrollbar { width: 4px; }
.rates-scroll-body::-webkit-scrollbar-track { background: transparent; }
.rates-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 255, 0.4);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   LEVEL 1 — CATEGORY GRID
   ═══════════════════════════════════════════════════════════════════ */

.rates-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    animation: ratesFadeIn 0.3s ease;
}

.rates-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.2rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 168, 255, 0.25);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.rates-cat-card:hover {
    transform: translateY(-4px) scale(1.04);
    border-color: #00a8ff;
    background: rgba(0, 168, 255, 0.08);
    box-shadow: 0 8px 28px rgba(0, 168, 255, 0.2);
}
.rates-cat-card:hover img {
    filter: drop-shadow(0 0 10px rgba(0, 168, 255, 0.7));
}

.rates-cat-card img {
    width: 52px;
    height: 52px;
    transition: filter 0.3s ease;
}

.rates-cat-card-label {
    font-family: 'Consolas', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #c0c0d0;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.3;
    transition: color 0.2s;
}
.rates-cat-card:hover .rates-cat-card-label { color: #00a8ff; }

/* section heading lines between cards */
.rates-section-heading {
    grid-column: 1 / -1;
    font-family: 'Consolas', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(0, 168, 255, 0.6);
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 0.5rem 0 0.3rem;
    border-bottom: 1px solid rgba(0, 168, 255, 0.15);
    margin-top: 0.4rem;
}

/* ═══════════════════════════════════════════════════════════════════
   LEVEL 2 — DETAIL VIEW
   ═══════════════════════════════════════════════════════════════════ */

.rates-detail-view {
    animation: ratesFadeIn 0.3s ease;
}

.rates-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 168, 255, 0.25);
}

.rates-detail-header img {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 8px rgba(0, 168, 255, 0.5));
}

.rates-detail-header h3 {
    margin: 0;
    font-family: 'Consolas', monospace;
    font-size: 1.15rem;
    color: #00a8ff;
    text-shadow: 0 0 8px rgba(0, 168, 255, 0.4);
    letter-spacing: 1px;
}

.rates-price-tag {
    display: inline-block;
    background: rgba(0, 168, 255, 0.12);
    border: 1px solid rgba(0, 168, 255, 0.4);
    color: #00ffcc;
    font-family: 'Consolas', monospace;
    font-size: 1.05rem;
    font-weight: 900;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
    box-shadow: 0 0 14px rgba(0, 255, 204, 0.15);
}

.rates-detail-rows {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.rates-detail-row {
    display: flex;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid rgba(0, 168, 255, 0.5);
    border-radius: 8px;
    padding: 0.8rem 1rem;
}

.rates-detail-row-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.rates-detail-row-icon img {
    width: 100%;
    height: 100%;
}

.rates-detail-row-content {
    flex: 1;
}

.rates-detail-row-title {
    font-family: 'Consolas', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(0, 168, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.rates-detail-row-text {
    font-size: 0.9rem;
    color: #c8c8d8;
    line-height: 1.5;
}

/* Payment milestone blocks */
.rates-milestone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.rates-milestone-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.05);
    text-align: center;
    gap: 0.4rem;
}
.rates-milestone-pct {
    font-family: 'Consolas', monospace;
    font-size: 1.6rem;
    font-weight: 900;
    text-shadow: 0 0 12px currentColor;
}
.rates-milestone-pct.cyan   { color: #00ffcc; }
.rates-milestone-pct.blue   { color: #00a8ff; }
.rates-milestone-pct.gold   { color: #ffd700; }
.rates-milestone-label {
    font-family: 'Consolas', monospace;
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.rates-milestone-desc {
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.4;
}

/* B2B notice block */
.rates-b2b-block {
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(57, 255, 20, 0.25);
    background: rgba(57, 255, 20, 0.04);
    font-size: 0.85rem;
    color: #b0b0c0;
    line-height: 1.5;
}
.rates-b2b-block strong { color: #39ff14; }

/* ═══════════════════════════════════════════════════════════════════
   FADE ANIMATION
   ═══════════════════════════════════════════════════════════════════ */

@keyframes ratesFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP: TOP-LEFT PULSE BOX (6s appear → disappear loop)
   ═══════════════════════════════════════════════════════════════════ */

#rates-desktop-pulse {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 8500;
    cursor: pointer;
    display: none; /* shown only on desktop via JS */
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(10, 8, 20, 0.92);
    border: 2px solid rgba(0, 168, 255, 0.65);
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    box-shadow: 0 0 22px rgba(0, 168, 255, 0.3), inset 0 0 10px rgba(255, 0, 170, 0.08);
    backdrop-filter: blur(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
    min-width: 180px;
}

#rates-desktop-pulse::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00a8ff, #ff00aa, transparent);
    background-size: 200% 100%;
    animation: ratesGradientShift 2.5s linear infinite;
    border-radius: 0 0 12px 12px;
}

#rates-desktop-pulse.rdp-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.95);
}

.rdp-icons {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.rdp-icon-glitch {
    width: 30px;
    height: 30px;
    animation: rdpIconGlitch 2.8s infinite linear;
}

@keyframes rdpIconGlitch {
    0%, 90%, 100% { filter: none; transform: translate(0, 0); }
    92%  { filter: hue-rotate(120deg) brightness(1.8); transform: translate(-2px, 1px); }
    94%  { filter: hue-rotate(240deg) saturate(2); transform: translate(2px, -1px); }
    96%  { filter: brightness(2); transform: translate(0, 0); }
}

.rdp-label {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: -1px 0 0 #ff00aa, 1px 0 0 #00a8ff;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE: SCROLL-TRIGGERED TOP BAR
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .rates-spacer-box {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: 2px solid rgba(0, 168, 255, 0.7) !important;
        z-index: 9100 !important;
        min-height: 54px !important;
        padding: 0.8rem 1.2rem !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        /* hidden by default — shown via JS scroll trigger */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-100%);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .rates-spacer-box.rates-top-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .rates-spacer-box:hover {
        transform: translateY(0) !important;
    }

    .rates-glitch-text { font-size: 1.1rem; letter-spacing: 2px; }

    #rates-panel {
        top: 0;
        left: 0;
        transform: translateY(-20px) scale(0.97);
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 18px 18px;
        max-height: 85vh;
        padding: 1.4rem 1rem 1rem;
    }
    #rates-panel.active {
        transform: translateY(0) scale(1);
    }

    .rates-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .rates-milestone-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    #rates-desktop-pulse { display: none !important; }
}

/* Desktop: hide mobile bar, show desktop pulse instead */
@media (min-width: 901px) {
    .rates-spacer-box {
        display: none !important;
    }
}
