/* Spa Ceylon Events: Portal Core Styles */

:root {
    /* --- Spa Ceylon Official Full Palette (12+ Colors) --- */
    --sc-bg-base: #F8F5EE;
    /* Soft Cream */
    --sc-bg-alt: #ECE6D6;
    /* Warm Beige */
    --sc-gold-light: #DBC18C;
    /* Highlights */
    --sc-gold-base: #B8994B;
    /* Luxury Gold */
    --sc-gold-dark: #8C6218;
    /* Deep Gold Gradient / Emphasis */
    --sc-action-blue: #12408B;
    /* Primary CTA */
    --sc-action-hover: #0C2B5E;
    /* Darker CTA */
    --sc-text-main: #111111;
    /* Deep Charcoal Text */
    --sc-text-muted: #6B7280;
    /* Slate Secondary Text */
    --sc-border-light: #E4DBC7;
    /* Subtle Separators */
    --sc-border-dark: #C2B39A;
    /* Strong Borders */
    --sc-danger-red: #B3261E;
    /* Error/Sale Tags */

    /* --- Existing Mappings --- */
    --pure-gold: var(--sc-gold-base);
    --deep-gold: var(--sc-gold-dark);
    --soft-gold: rgba(184, 153, 75, 0.15);

    --clay: var(--sc-bg-base);
    --charcoal: var(--sc-text-main);
    --smoke: var(--sc-text-muted);
    --glass: rgba(248, 245, 238, 0.94);
    --border: var(--sc-border-light);

    --action-blue: var(--sc-action-blue);
    --action-hover: var(--sc-action-hover);

    --shadow-sm: 0 8px 18px rgba(17, 17, 17, 0.04);
    --shadow-md: 0 16px 48px rgba(17, 17, 17, 0.06);
    --shadow-lg: 0 24px 60px rgba(147, 115, 38, 0.12);

    --focus-ring: 0 0 0 4px rgba(197, 160, 89, 0.18);

    --radius-card: 20px;
    --radius-xl: 28px;

    --z-overlay: 1000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--clay);
    color: var(--charcoal);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
.brand-font {
    font-family: 'Playfair Display', Georgia, serif;
}

/* --- Shared Focus --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.radio-tile input:focus-visible+.radio-tile-content {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-book:focus-visible,
.qty-btn:focus-visible,
.session-select-btn:focus-visible,
.expired-card .btn-refresh:focus-visible,
.input-lux:focus,
.radio-tile input:focus-visible+.radio-tile-content {
    border-color: var(--pure-gold);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Brand Header --- */
.brand-header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.brand-logo {
    max-width: 200px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.brand-logo:hover,
.brand-logo:focus-visible {
    transform: scale(1.05);
}

/* --- Landing Page: Event Grid --- */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--charcoal);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--smoke);
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.event-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-card:hover,
.event-card:focus-within {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--pure-gold);
}

.event-img-wrap {
    height: 260px;
    overflow: hidden;
    background: #eee;
}

.event-card img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}

.event-body {
    padding: 2rem;
    flex-grow: 1;
}

.event-tag,
.seats-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.event-tag {
    background: var(--soft-gold);
    color: var(--deep-gold);
    margin-bottom: 1rem;
}

.seats-badge {
    font-size: 0.72rem;
    margin-top: 8px;
}

.event-name {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.event-price {
    color: var(--pure-gold);
    font-weight: 600;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.btn-book {
    background: var(--action-blue);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-book:hover,
.btn-book:focus-visible {
    background: var(--action-hover);
    color: #fff;
    text-decoration: none;
}

.btn-book:active {
    transform: scale(0.98);
}

/* --- Booking Page --- */
.booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.card-lux {
    background: #fff;
    border: none;
    border-radius: 28px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
}

.input-lux {
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    background: #fafafa;
    padding: 1.1rem 1.25rem;
    width: 100%;
    font-size: 1.05rem;
    color: var(--charcoal);
    transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-lux::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}

.input-lux:focus {
    border-color: var(--pure-gold);
    background: #fff;
    outline: none;
    box-shadow: 0 6px 16px rgba(197, 160, 89, 0.12);
}

.label-lux {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

/* --- Sessions --- */
.session-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.session-item:hover,
.session-item:focus-within {
    border-color: var(--pure-gold);
    background: var(--clay);
}

.sess-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.sess-meta {
    font-size: 0.9rem;
    color: var(--smoke);
    line-height: 1.5;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--pure-gold);
    background: #fff;
    color: var(--pure-gold);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.qty-btn:hover,
.qty-btn:focus-visible {
    background: var(--pure-gold);
    color: #fff;
}

.qty-btn:active {
    transform: scale(0.96);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #b8b8b8;
    border-color: #ddd;
    box-shadow: none;
}

.qty-val {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    background: transparent;
    color: var(--charcoal);
    font-variant-numeric: tabular-nums;
}

.session-item.is-selected {
    border-color: var(--pure-gold);
    background: rgba(197, 160, 89, 0.08);
    box-shadow: 0 10px 24px rgba(197, 160, 89, 0.12);
}

.session-select-btn {
    min-width: 120px;
    text-align: center;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}

.session-select-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Status Pills --- */
.status-bar {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pill {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--smoke);
    display: inline-flex;
    align-items: center;
}

.pill-gold {
    border-color: var(--pure-gold);
    color: var(--deep-gold);
    background: var(--soft-gold);
}

.fomo-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(197, 160, 89, 0.06);
}

.fomo-seats {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--smoke);
}

.fomo-seats strong {
    color: var(--charcoal);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.fomo-progress-wrap {
    flex: 1;
    min-width: 120px;
    max-width: 220px;
}

.fomo-progress-track {
    height: 6px;
    background: #f0ede6;
    border-radius: 999px;
    overflow: hidden;
}

.fomo-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--pure-gold);
    transition: width 0.4s ease;
}

.fomo-pct {
    font-size: 0.75rem;
    color: var(--smoke);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.fomo-timer {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--smoke);
    white-space: nowrap;
}

.fomo-timer span {
    font-weight: 800;
    color: var(--charcoal);
    font-variant-numeric: tabular-nums;
}

.fomo-sold {
    font-weight: 700;
    color: #b3261e;
}

/* --- Expired Overlay --- */
.expired-overlay {
    position: fixed;
    inset: 0;
    background: rgba(249, 248, 244, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
    padding: 1rem;
}

.expired-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.expired-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.expired-card p {
    color: var(--smoke);
    font-size: 0.9rem;
    line-height: 1.5;
}

.expired-card .btn-refresh {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.7rem 2rem;
    background: var(--charcoal);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.expired-card .btn-refresh:hover,
.expired-card .btn-refresh:focus-visible {
    background: var(--pure-gold);
}

.expired-card .btn-refresh:active {
    transform: scale(0.98);
}

.expired-card .countdown {
    font-size: 0.82rem;
    color: var(--smoke);
    margin-top: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* --- Radio Tiles --- */
.radio-tile-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.5rem;
}

.radio-tile {
    position: relative;
    flex: 1;
    min-width: 100px;
    cursor: pointer;
}

.radio-tile input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 0.5rem;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    background: #fafafa;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--charcoal);
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.radio-tile:hover .radio-tile-content {
    border-color: var(--pure-gold);
    background: #fff;
}

.radio-tile input:checked+.radio-tile-content {
    border-color: var(--pure-gold);
    background: #fff;
    color: var(--charcoal);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--pure-gold), 0 4px 12px rgba(197, 160, 89, 0.12);
}

.radio-tile-label {
    line-height: 1.2;
}

.participant-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.03);
}

/* --- Utility --- */
.text-smoke {
    color: var(--smoke);
}

.text-gold {
    color: var(--pure-gold);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .session-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .qty-box {
        width: 100%;
        justify-content: space-between;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .status-bar {
        justify-content: flex-start;
    }

    .fomo-bar {
        align-items: flex-start;
    }

    .fomo-timer {
        margin-left: 0;
        width: 100%;
    }

    .card-lux {
        padding: 2rem 1.25rem;
        border-radius: 22px;
    }

    .event-img-wrap {
        height: 220px;
    }

    .brand-header {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .booking-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .event-body {
        padding: 1.25rem;
    }

    .event-name {
        font-size: 1.4rem;
    }

    .btn-book {
        width: 100%;
        text-align: center;
    }

    .radio-tile {
        min-width: calc(50% - 5px);
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}