/* TableCheck Virtual Queue - Demo Styling */

/* CSS Variables */
:root {
    /* Colors - TableCheck Brand */
    --primary: #5C11A6;
    --primary-dark: #4a0d85;
    --primary-light: #7935d2;
    --accent: #F7D147;
    --success: #2d7a4f;
    --warning: #f4a261;
    --danger: #e76f51;

    /* Neutrals */
    --surface: #ffffff;
    --surface-raised: #f8f9fa;
    --surface-overlay: rgba(26, 58, 82, 0.05);
    --border: #e1e4e8;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #95a5a6;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Typography */
    --font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 36px;
    --font-size-3xl: 48px;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 999px;

    /* Animations */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--primary);
    padding: var(--spacing-lg) var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-logo {
    height: 32px;
}

.logo-svg {
    height: 100%;
    width: auto;
}

.logo-svg path {
    fill: var(--surface);
}

.header-title {
    color: var(--surface);
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.locale-switcher {
    flex-shrink: 0;
}

.locale-switcher select {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    color: var(--surface);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.locale-switcher select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.locale-switcher select:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.locale-switcher select option {
    background: var(--primary);
    color: var(--surface);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: flex;
    align-items: center;
}

.queue-card {
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

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

/* Status Icon */
.status-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.status-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--surface);
    box-shadow: var(--shadow-md);
    animation: pulse 2s ease-in-out infinite;
}

.status-icon::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    opacity: 0.3;
    z-index: -1;
}

.status-icon svg {
    width: 40px;
    height: 40px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(92, 17, 166, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(121, 53, 210, 0.5);
    }
}

/* Typography */
.title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: var(--font-size-lg);
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
}

/* Status Section */
.status-section {
    margin-bottom: var(--spacing-xl);
}

.status-display {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.status-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-secondary);
}

.status-queued {
    color: var(--primary);
}

.status-active {
    color: var(--success);
}

.status-error {
    color: var(--danger);
}

/* Queue Info */
.queue-info {
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-lg);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.info-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

/* Active Info */
.active-info {
    text-align: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: var(--radius-lg);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--surface);
    margin: 0 auto var(--spacing-lg);
}

.success-icon svg {
    width: 36px;
    height: 36px;
}

.active-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--success);
    margin-bottom: var(--spacing-sm);
}

.active-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

/* Progress Bar */
.progress-container {
    margin-bottom: var(--spacing-xl);
}

.progress-bar {
    height: 12px;
    background: linear-gradient(90deg, #e8eaed 0%, #f1f3f4 50%, #e8eaed 100%);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,
        var(--primary) 0%,
        var(--primary-light) 25%,
        var(--accent) 50%,
        var(--primary-light) 75%,
        var(--primary) 100%
    );
    background-size: 200% 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    width: 0%;
    position: relative;
    box-shadow: 0 0 10px rgba(92, 17, 166, 0.4);
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(92, 17, 166, 0.4);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 15px rgba(247, 209, 71, 0.6);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(92, 17, 166, 0.4);
    }
}

/* Message Section */
.message-section {
    background: var(--surface-overlay);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border-left: 4px solid var(--primary);
}

.message-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.message-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.warning-message {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    background: #fff9e6;
    border: 1px solid #ffe066;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #856404;
}

.warning-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Footer */
.footer {
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--surface-raised);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.footer-text {
    font-weight: 500;
}

.footer-logo {
    height: 12px;
    width: auto;
}

.footer-logo path {
    fill: var(--text-muted);
}

.footer-brand {
    font-weight: 600;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    :root {
        --font-size-2xl: 28px;
        --font-size-3xl: 36px;
    }

    .header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .header-content {
        gap: var(--spacing-sm);
    }

    .header-title {
        font-size: var(--font-size-lg);
    }

    .header-logo {
        height: 24px;
    }

    .locale-switcher select {
        padding: 6px 10px;
        font-size: 12px;
    }

    .main-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .queue-card {
        padding: 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .info-value {
        font-size: 32px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: var(--font-size-base);
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.loading {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 800px 104px;
}

/* Print Styles */
@media print {
    .page-wrapper {
        background: white;
    }

    .container {
        box-shadow: none;
    }

    .header,
    .footer {
        display: none;
    }
}
