/* Meet.Bingo Design System - Following Design Manual */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --color-primary: #8B5CF6; /* Electric violet */
    --color-primary-hover: #7C3AED;
    --color-primary-light: #F3F4F6;
    
    --color-accent: #10B981; /* Mint/cyan for soft actions */
    --color-accent-hover: #059669;
    --color-accent-light: #D1FAE5;
    
    --color-success: #2ECC71;
    --color-error: #E74C3C;
    --color-warning: #F1C40F;
    
    --color-background: #FFFFFF;
    --color-background-alt: #F9FAFB;
    --color-surface: #FFFFFF;
    
    --color-text-primary: #111827;
    --color-text-secondary: #6B7280;
    --color-text-tertiary: #9CA3AF;
    
    --color-border: #E5E7EB;
    --color-border-hover: #D1D5DB;
    
    /* Typography Scale */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-display: 'Space Grotesk', 'Inter', sans-serif;
    
    --font-size-h1: 36px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-body: 16px;
    --font-size-small: 14px;
    --font-size-xs: 12px;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* 8pt Spacing System */
    --space-1: 8px;   /* 1 unit */
    --space-2: 16px;  /* 2 units */
    --space-3: 24px;  /* 3 units */
    --space-4: 32px;  /* 4 units */
    --space-5: 40px;  /* 5 units */
    --space-6: 48px;  /* 6 units */
    --space-8: 64px;  /* 8 units */
    --space-10: 80px; /* 10 units */
    --space-12: 96px; /* 12 units */
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

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

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

/* Buttons - Following "Guide, Don't Ask" Principle */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 48px; /* Accessible tap target */
    gap: var(--space-1);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    width: 100%; /* Full width by default */
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-accent);
    color: white;
    width: 100%;
}

.btn-secondary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

.btn-danger:hover {
    background: #C0392B;
}

/* Inline buttons (not full width) */
.btn-inline {
    width: auto;
    min-width: 120px;
}

/* Forms - "Fewer fields = better" */
.form-group {
    margin-bottom: var(--space-3);
}

.form-label {
    display: block;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
    font-size: var(--font-size-small);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-2);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body);
    transition: border-color var(--transition-fast);
    background: var(--color-background);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-hint {
    font-size: var(--font-size-small);
    color: var(--color-text-tertiary);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--font-size-small);
    color: var(--color-error);
    margin-top: var(--space-1);
    font-weight: var(--font-weight-medium);
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Status Messages - Human and Helpful */
.alert {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-3);
}

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

.alert-error {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid var(--color-error);
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid var(--color-warning);
}

/* Loading States - Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.skeleton-text {
    height: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-1);
}

.skeleton-button {
    height: 48px;
    border-radius: var(--radius-md);
    width: 100%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Spacing Utilities */
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }

.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 20px;
    }
    
    .container {
        padding: 0 var(--space-2);
    }
    
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%; /* All buttons full width on mobile */
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Ensure color contrast passes WCAG 2.1 AA */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: #92400E; }

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text-secondary: #000000;
    }
}