/* ── Booking Page ── */

/* ── Seat Loading Spinner ── */
.seat-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 0;
}

.seat-loader__msg {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}

.pl {
    width: 6em;
    height: 6em;
}

.pl__ring {
    animation: ringA 2s linear infinite;
}

.pl__ring--a {
    stroke: #C9A84C; /* gold */
}

.pl__ring--b {
    animation-name: ringB;
    stroke: #e2e8f1; /* slate-blue */
}

.pl__ring--c {
    animation-name: ringC;
    stroke: #dba21b; /* text/cream */
}

.pl__ring--d {
    animation-name: ringD;
    stroke: #8A8F9E; /* muted */
}

@keyframes ringA {
    from, 4% {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -330;
    }
    12% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -335;
    }
    32% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -595;
    }
    40%, 54% {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -660;
    }
    62% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -665;
    }
    82% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -925;
    }
    90%, to {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -990;
    }
}

@keyframes ringB {
    from, 12% {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -110;
    }
    20% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -115;
    }
    40% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -195;
    }
    48%, 62% {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }
    70% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }
    90% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -305;
    }
    98%, to {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -330;
    }
}

@keyframes ringC {
    from {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: 0;
    }
    8% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -5;
    }
    28% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -175;
    }
    36%, 58% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }
    66% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }
    86% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -395;
    }
    94%, to {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -440;
    }
}

@keyframes ringD {
    from, 8% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: 0;
    }
    16% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -5;
    }
    36% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -175;
    }
    44%, 50% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }
    58% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }
    78% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -395;
    }
    86%, to {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -440;
    }
}

/* Layout */
.booking-main {
    padding: 4rem;
    min-height: calc(100vh - 80px);
}

.booking-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* ── Seat Map Panel ── */
.seat-map-panel h2 {
    margin-bottom: 2rem;
}

.seat-section {
    margin-bottom: 2.5rem;
}

.section-label {
    font-family: var(--font-label);
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.vvip-label {
    background-color: var(--gold);
    color: var(--bg);
}

.vip-label {
    background-color: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.seat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 1.5rem;
    background: var(--slate);
    border: 1px solid rgba(201, 168, 76, 0.15);
}

/* ── Seat States ── */
.seat {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.seat.available {
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
}

.seat.available:hover {
    background: rgba(201, 168, 76, 0.3);
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.45);
    transform: scale(1.12);
}

.seat.booked {
    background: rgba(240, 237, 230, 0.08);
    border: 1px solid rgba(240, 237, 230, 0.25);
    color: rgba(240, 237, 230, 0.45);
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-color: rgba(240, 237, 230, 0.25);
}

.seat.selected {
    background: var(--gold);
    border: 1px solid var(--gold);
    color: var(--bg);
    font-weight: 700;
    animation: seat-pulse 1.4s ease-in-out infinite;
}

@keyframes seat-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.6); }
    50%       { box-shadow: 0 0 0 7px rgba(201, 168, 76, 0); }
}

/* ── Seat Legend ── */
.seat-legend {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--muted);
}

.legend-dot {
    width: 18px;
    height: 18px;
}

.legend-dot.available {
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid var(--gold);
}

.legend-dot.selected {
    background: var(--gold);
}

.legend-dot.booked {
    background: rgba(240, 237, 230, 0.08);
    border: 1px solid rgba(240, 237, 230, 0.25);
}

/* ── Booking Sidebar ── */
.booking-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Seat Summary ── */
.seat-summary {
    background: var(--slate);
    border: 1px solid rgba(201, 168, 76, 0.25);
    padding: 1.5rem;
}

.no-seat-msg {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    font-size: 0.85rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--muted);
    font-family: var(--font-ui);
}

.summary-value {
    color: var(--text);
    font-family: var(--font-ui);
}

.summary-price {
    color: var(--gold);
    font-family: var(--font-label);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

/* ── Booking Form ── */
#booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--slate);
    border: 1px solid rgba(201, 168, 76, 0.15);
    padding: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: var(--font-label);
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    color: var(--muted);
}

.form-group input {
    background: var(--bg);
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-group input:focus {
    border-color: var(--gold);
}

.form-group input.invalid {
    border-color: #c0392b;
}

.field-error {
    color: #e74c3c;
    font-size: 0.75rem;
    font-family: var(--font-ui);
    min-height: 1em;
}

/* ── Submit Button ── */
.submit-btn {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.submit-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ── Submit Button Loading State ── */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.75;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
}

.submit-btn.loading::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(8, 11, 20, 0.35);
    border-top-color: #080B14;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.submit-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0;
}

.privacy-notice {
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
}

.privacy-notice a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-notice a:hover {
    color: var(--text);
}

/* ── Upgrade Banner ── */
.upgrade-banner {
    background: rgba(201, 168, 76, 0.12);
    border-left: 3px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

/* ── Responsive — Mobile ── */
@media (max-width: 768px) {
    .booking-main {
        padding: 2rem 1.25rem;
    }

    /* Stack: seat map on top, form below */
    .booking-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Sidebar no longer needs to be sticky on mobile */
    .booking-sidebar {
        position: static;
    }

    /* Slightly smaller seats so 15 VIP seats fit in a row on a phone */
    .seat {
        width: 34px;
        height: 34px;
        font-size: 0.55rem;
    }

    .seat-grid {
        padding: 1rem;
        gap: 6px;
    }

    .seat-legend {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Form full-width padding reduction */
    #booking-form {
        padding: 1.5rem;
    }

    .form-group input {
        font-size: 1rem; /* prevent iOS zoom on input focus */
    }
}

@media (max-width: 400px) {
    .seat {
        width: 30px;
        height: 30px;
        font-size: 0.5rem;
    }

    .seat-grid {
        gap: 5px;
        padding: 0.75rem;
    }
}

/* ── Booking Lookup ── */
.booking-lookup {
    max-width: 1200px;
    margin: 3.5rem auto 0;
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.lookup-heading {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.lookup-desc {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.lookup-form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.lookup-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid rgba(201, 168, 76, 0.25);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 0;
}

.lookup-input:focus {
    border-color: var(--gold);
}

.lookup-input.invalid {
    border-color: #c0392b;
}

.lookup-field-error {
    display: block;
    color: #e74c3c;
    font-size: 0.75rem;
    font-family: var(--font-ui);
    min-height: 1em;
    margin-top: 0.4rem;
}

.lookup-btn {
    white-space: nowrap;
    padding: 0.75rem 1.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

/* ── Result card ── */
.lookup-card {
    margin-top: 1.5rem;
    background: var(--slate);
    border: 1px solid rgba(201, 168, 76, 0.2);
    padding: 1.75rem;
}

.lookup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.lookup-ref {
    font-family: var(--font-ui);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.lookup-status-pill {
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
}

.lookup-status-pill.status-confirmed            { background: rgba(39,174,96,0.15);  color: #58d68d; border: 1px solid rgba(39,174,96,0.3); }
.lookup-status-pill.status-awaiting_confirmation { background: rgba(243,156,18,0.15); color: #f39c12; border: 1px solid rgba(243,156,18,0.3); }
.lookup-status-pill.status-pending              { background: rgba(52,152,219,0.15); color: #5dade2; border: 1px solid rgba(52,152,219,0.3); }
.lookup-status-pill.status-cancelled            { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.lookup-status-pill.status-expired              { background: rgba(240,237,230,0.08); color: var(--muted); border: 1px solid rgba(240,237,230,0.15); }

.lookup-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.2rem;
}

.lookup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
    font-size: 0.85rem;
    font-family: var(--font-ui);
}

.lookup-row:last-child { border-bottom: none; }

.lookup-row span:first-child { color: var(--muted); }
.lookup-row span:last-child  { color: var(--text); }
.lookup-row .gold            { color: var(--gold); font-family: var(--font-label); letter-spacing: 0.08em; }

.lookup-status-msg {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 1rem;
}

/* ── Re-upload area ── */
.lookup-reupload {
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lookup-reupload-label {
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0;
}

.lookup-file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px dashed rgba(201,168,76,0.4);
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lookup-file-label:hover {
    background: rgba(201, 168, 76, 0.08);
    border-color: var(--gold);
}

.lookup-file-input {
    display: none;
}

.lookup-file-name {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--muted);
    min-height: 1em;
}

.lookup-upload-btn {
    align-self: flex-start;
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

.lookup-upload-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.lookup-upload-status {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    min-height: 1em;
}

.lookup-upload-status.success { color: #58d68d; }
.lookup-upload-status.error   { color: #e74c3c; }

.lookup-not-found,
.lookup-error {
    margin-top: 1rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--muted);
}
.lookup-error { color: #e74c3c; }

/* ── Upgrade section ── */
.lookup-upgrade {
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lookup-upgrade-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.lookup-upgrade-icon {
    font-size: 1.35rem;
    color: var(--gold);
    line-height: 1;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.lookup-upgrade-header strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 0.2rem;
}

.lookup-upgrade-header p {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
}

.lookup-upgrade-header strong strong,
.lookup-upgrade-header p strong {
    color: var(--gold);
}

.lookup-upgrade-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lookup-upgrade-select {
    width: 100%;
    background: var(--bg);
    border: 1px solid rgba(201, 168, 76, 0.25);
    color: var(--text);
    padding: 0.7rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a84c' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.5rem;
}

.lookup-upgrade-select:focus {
    border-color: var(--gold);
}

.lookup-upgrade-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lookup-upgrade-rejected {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: #e67e22;
    background: rgba(230, 126, 34, 0.08);
    border-left: 3px solid #e67e22;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

/* Pending / status messages inside the lookup card */
.lookup-upgrade-status-msg {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    padding: 0.65rem 0.9rem;
    margin: 0.25rem 0 0;
    border-left: 3px solid;
}

.lookup-upgrade-pending {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.08);
    border-color: #f39c12;
}

/* ── Upgrade payment details ── */
.upg-payment-details {
    margin-bottom: 0.5rem;
}

.upg-payment-note {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--muted);
    background: rgba(201, 168, 76, 0.07);
    border-left: 3px solid var(--gold);
    padding: 0.65rem 0.9rem;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.upg-payment-note strong {
    color: var(--gold);
}

.upg-tab-bar {
    display: flex;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    margin-bottom: 0;
}

.upg-tab-btn {
    font-family: var(--font-label);
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.upg-tab-btn:hover {
    color: var(--text);
}

.upg-tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.upg-tab-panel {
    display: none;
    background: var(--slate);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-top: none;
    padding: 1rem 1.25rem;
}

.upg-tab-panel.active {
    display: block;
}

.upg-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
    font-size: 0.85rem;
}

.upg-detail-row:last-of-type {
    border-bottom: none;
}

.upg-detail-label {
    color: var(--muted);
    font-family: var(--font-ui);
}

.upg-detail-value {
    color: var(--text);
    font-family: var(--font-ui);
    font-weight: 500;
}

.upg-copy-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.upg-lipa-qr {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upg-lipa-qr-label {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
}

.upg-lipa-qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 6px;
    background: #fff;
    padding: 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .lookup-form {
        flex-direction: column;
    }

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