/*
 * Zoom Room Common Styles
 * Shared across all customer-facing pages
 */

:root {
    /* Zoom Room Brand Colors */
    --zr-blue: #00468b;
    --zr-orange: #f37021;
    --zr-orange-90: rgba(243, 112, 33, 0.9);
    --primary: #00468b;
    --primary-dark: #003366;
    --primary-light: #e6f0f9;
    --accent: #f37021;
    --accent-dark: #d4530a;
    --accent-light: #fef0e6;
    --secondary: #00468b;
    --secondary-light: #e6f0f9;
    --warning: #f37021;
    --warning-light: #fef0e6;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --success: #16a34a;
    --success-light: #dcfce7;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #333333;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content area grows to push footer down */
main {
    flex: 1 0 auto;
    width: 100%;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: white;
    border-bottom: 3px solid var(--accent);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 48px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.header-nav a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.header-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.header-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.header-nav a.nav-primary {
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
}

.header-nav a.nav-primary:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.franchise-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.5px;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.franchise-link:hover {
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.2s;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.mobile-nav a {
    padding: 12px 24px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.mobile-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-nav.active {
    display: flex;
}

@media (max-width: 900px) {
    .header-nav, .franchise-link {
        display: none;
    }
    .mobile-menu-btn {
        display: none;
    }
    .mobile-nav {
        display: none;
    }
}

/* Extra-small screens (iPhone Mini, etc.) */
@media (max-width: 480px) {
    .header {
        padding: 10px 16px;
    }
    .header-content {
        gap: 12px;
    }
    .logo img {
        height: 32px;
    }
    /* Hide location text to prevent width blowout */
    #header-location {
        display: none !important;
    }
    .header-right {
        gap: 12px;
    }
}

/* ============================================
   Main Container
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

input[type="password"] {
    font-family: inherit;
    letter-spacing: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Buttons
   ============================================ */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
}

.btn-accent:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: #ea580c;  /* Dark orange for "Only X Spots" */
    color: white;
}

.btn-warning:hover {
    background: #c2410c;
}

.btn-waitlist {
    background: #fdba74;  /* Light orange for "Join Waitlist" */
    color: #7c2d12;
}

.btn-waitlist:hover {
    background: #fb923c;
}

.btn-primary {
    background: var(--primary);  /* Dark blue for "Book" */
    color: white;
}

.btn-primary:hover {
    background: #003366;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner-dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

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

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   Divider
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 24px;
    margin-top: 48px;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.footer-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-nav-links a:hover {
    opacity: 1;
}

.footer-nav-links .separator {
    opacity: 0.5;
    font-size: 10px;
}

.footer-social {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.footer-social a {
    color: white;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.7;
}

.footer-legal {
    display: flex;
    gap: 16px;
}

.footer-legal a {
    color: white;
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-nav-links {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
