/* ============================================================
   Short Notice Booking Request — Mobile-First Design System
   Playhem Entertainment Group
   ============================================================ */

:root {
    --bg-page: #0a0e1a;
    --bg-surface: #111827;
    --bg-elevated: #1e293b;
    --bg-input: #0f172a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e3a5f;
    --border-subtle: rgba(59, 130, 246, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---- Container ---- */
.booking-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---- Brand Header (compact, shown on form steps only) ---- */
.brand-header--compact {
    text-align: center;
    padding: 8px 0 0;
    flex-shrink: 0;
}
.brand-header--compact h1 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ---- Progress Dots ---- */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 14px;
    flex-shrink: 0;
}
.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    transition: all 0.3s ease;
}
.progress-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}
.progress-dot.completed {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 0.5;
}

/* ---- Steps Viewport ---- */
.steps-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}
.steps-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}
.step {
    min-width: 100%;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}
.step::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}
.step.active {
    opacity: 1;
}

/* ---- Step Content ---- */
.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.step-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ---- Welcome Step ---- */
.welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 20px;
}
.welcome-venue-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.welcome-body {
    flex: 0;
}
.welcome-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
    text-align: justify;
    text-align-last: center;
}
.welcome-body .hours-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-top: 8px;
}
.welcome-body .hours-note .icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.welcome-body .hours-note p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: left;
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder {
    color: var(--text-muted);
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}
.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
    display: none;
}
.form-error.visible {
    display: block;
}
.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* ---- Stacked Pill Selectors ---- */
.pill-group-stacked {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}
.pill-stacked {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 54px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
    -webkit-user-select: none;
}
.pill-stacked:active {
    transform: scale(0.98);
}
.pill-stacked.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Centered text pills (for player count numbers) */
.pill-stacked.pill-centered {
    text-align: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 50px;
    padding: 10px 20px;
}

.pill-stacked .pill-sub {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color var(--transition);
}
.pill-stacked.selected .pill-sub {
    color: #fff;
    opacity: 0.85;
}
/* Today/Tomorrow date tags — pinned to top-right of pill */
.pill-stacked {
    position: relative;
}
.pill-date-tag {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    line-height: 1.3;
}
.pill-date-tag.tag-today {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.pill-date-tag.tag-tomorrow {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
.pill-stacked.selected .pill-date-tag.tag-today {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.pill-stacked.selected .pill-date-tag.tag-tomorrow {
    background: rgba(251, 191, 36, 0.3);
    color: #fde68a;
}
.pill-stacked .pill-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pill-stacked .min-badge {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}
.pill-stacked.selected .min-badge {
    color: #fff;
    opacity: 0.85;
}


/* Activity group headers */
.activity-group-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-left: 4px;
}
.activity-group-header:first-child {
    margin-top: 0;
}

/* Min-player warning */
.min-player-warning {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--warning-soft);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--warning);
    line-height: 1.4;
}
.min-player-warning.visible {
    display: flex;
}
.min-player-warning .warn-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* Specific time pickers */
.time-pickers {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}
.time-pickers.visible {
    display: flex;
}
.time-picker-row {
    display: flex;
    gap: 12px;
}

/* Today/Tomorrow toggle for specific time */
.specific-day-toggle {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.day-toggle {
    flex: 1;
    padding: 8px 0;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: none;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.day-toggle.selected {
    background: var(--accent);
    color: #fff;
}
.time-picker-group {
    flex: 1;
}
.time-picker-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.time-picker-group input[type="time"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    color-scheme: dark;
}
.time-picker-group input[type="time"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- Review Summary Card ---- */
.review-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.review-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border-subtle);
}
.review-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--transition);
}
.review-row:last-child {
    border-bottom: none;
}
.review-row:active {
    background: var(--bg-elevated);
}
.review-row .review-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.review-row .review-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}
.review-row .edit-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-left: 12px;
    opacity: 0.6;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 56px;
}
.btn:active {
    transform: scale(0.98);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-primary:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.btn-back {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 10px 16px;
    width: auto;
    min-height: auto;
}
.btn-back:hover {
    color: var(--text-secondary);
}

/* Button row — pinned at bottom via flex */
.step-buttons {
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(to bottom, transparent, var(--bg-page) 12px);
    padding: 24px 0 32px;
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px));
    z-index: 10;
}

/* Loading spinner in button */
.btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { display: none; }

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

/* ---- Mobile Prefix Input ---- */
.mobile-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
}
.mobile-prefix {
    padding: 12px 5px 10px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    user-select: none;
}
.mobile-input {
    border-radius: 0 var(--radius) var(--radius) 0 !important;
}
.mobile-input-wrap:focus-within .mobile-prefix {
    border-color: var(--accent);
}

/* ---- Confirmation Screen ---- */
.confirmation {
    text-align: center;
    padding: 40px 0;
}
.confirmation .check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--success-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirmation .check-circle svg {
    width: 36px;
    height: 36px;
    color: var(--success);
}
.confirmation h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.confirmation p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.confirmation .response-note {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- Weekend staffed card (welcome screen) ---- */
.welcome-staffed-card {
    background: var(--success-soft);
    border: 1.5px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-top: 16px;
    text-align: center;
}
.welcome-staffed-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 6px;
}
.welcome-staffed-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 14px;
}
.welcome-staffed-cta {
    display: inline-block;
    padding: 12px 24px;
    background: var(--success);
    color: #fff;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition);
}
.welcome-staffed-cta:active {
    opacity: 0.85;
}

/* ---- Direct Booking Banner (time step) ---- */
.direct-booking-banner {
    background: var(--success-soft);
    border: 1.5px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.direct-booking-banner-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.direct-booking-banner-body strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}
.direct-booking-banner-body span {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.btn-banner-link {
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--success);
    text-decoration: none;
    transition: opacity var(--transition);
}
.btn-banner-link:hover {
    opacity: 0.8;
}
.banner-line {
    display: block;
}

/* ---- Disabled time pills ---- */
.pill-stacked.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

/* ---- Book Direct time pills ---- */
.pill-stacked.book-direct {
    background: var(--success-soft);
    border-color: var(--success);
    cursor: pointer;
}
.pill-stacked.book-direct .pill-label,
.pill-stacked.book-direct .pill-sub {
    opacity: 0.7;
}
.pill-stacked.book-direct .pill-date-tag {
    display: none;
}
.pill-direct-link {
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    text-decoration: none;
    margin-top: 4px;
    display: block;
}
.pill-direct-link:hover {
    opacity: 0.8;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
    .booking-container {
        padding: 32px 24px 48px;
    }
    .welcome-venue-name {
        font-size: 2rem;
    }
}
