/* ============================================================
   GRIDIRON COMMAND - DESIGN SYSTEM
   ============================================================

   This file provides:
   1. Semantic CSS variables (colors, spacing, typography)
   2. Dark/Light theme support via [data-theme]
   3. League white-label overrides via [data-league] or inline vars
   4. Reusable component classes (.gc-*)

   Usage:
   - Include this CSS in every page
   - Components use .gc-* prefix
   - See COMPONENT_GUIDE.md for copy-paste examples

   ============================================================ */

/* ============================================================
   1. ROOT VARIABLES - DARK THEME (DEFAULT)
   ============================================================ */
:root {
    /* === SEMANTIC COLORS === */
    /* Backgrounds */
    --gc-bg-app: #0a0d14;
    --gc-bg-panel: #12161f;
    --gc-bg-elevated: #1e2433;
    --gc-bg-input: rgba(0, 0, 0, 0.3);
    --gc-bg-hover: rgba(255, 255, 255, 0.05);

    /* Text */
    --gc-text-primary: #ffffff;
    --gc-text-secondary: #9ca3af;
    --gc-text-muted: #6b7280;
    --gc-text-inverse: #0a0d14;

    /* Borders */
    --gc-border-subtle: rgba(255, 255, 255, 0.08);
    --gc-border-default: rgba(255, 255, 255, 0.15);
    --gc-border-strong: rgba(255, 255, 255, 0.25);

    /* Brand Colors - Can be overridden by league */
    --gc-accent: #22c55e;
    --gc-accent-dark: #16a34a;
    --gc-accent-glow: rgba(34, 197, 94, 0.3);
    --gc-accent-subtle: rgba(34, 197, 94, 0.1);

    --gc-secondary: #3b82f6;
    --gc-secondary-dark: #2563eb;
    --gc-secondary-glow: rgba(59, 130, 246, 0.3);

    /* Status Colors */
    --gc-success: #22c55e;
    --gc-success-bg: rgba(34, 197, 94, 0.1);
    --gc-success-border: rgba(34, 197, 94, 0.3);

    --gc-error: #ef4444;
    --gc-error-bg: rgba(239, 68, 68, 0.1);
    --gc-error-border: rgba(239, 68, 68, 0.3);

    --gc-warning: #f59e0b;
    --gc-warning-bg: rgba(245, 158, 11, 0.1);
    --gc-warning-border: rgba(245, 158, 11, 0.3);

    --gc-info: #3b82f6;
    --gc-info-bg: rgba(59, 130, 246, 0.1);
    --gc-info-border: rgba(59, 130, 246, 0.3);

    /* === TYPOGRAPHY === */
    --gc-font-display: 'Saira Condensed', 'Rajdhani', system-ui, sans-serif;
    --gc-font-body: 'Rajdhani', system-ui, sans-serif;
    --gc-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* === SPACING === */
    --gc-space-xs: 4px;
    --gc-space-sm: 8px;
    --gc-space-md: 16px;
    --gc-space-lg: 24px;
    --gc-space-xl: 32px;
    --gc-space-2xl: 48px;

    /* === RADII === */
    --gc-radius-sm: 6px;
    --gc-radius-md: 10px;
    --gc-radius-lg: 16px;
    --gc-radius-xl: 24px;
    --gc-radius-full: 9999px;

    /* === SHADOWS === */
    --gc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --gc-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --gc-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --gc-shadow-glow: 0 0 30px var(--gc-accent-glow);

    /* === TRANSITIONS === */
    --gc-transition-fast: 0.15s ease;
    --gc-transition-normal: 0.3s ease;
    --gc-transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* === Z-INDEX SCALE === */
    --gc-z-dropdown: 100;
    --gc-z-sticky: 200;
    --gc-z-modal: 1000;
    --gc-z-modal-elevated: 2000;
    --gc-z-toast: 3000;

    /* === GLASSMORPHISM === */
    --gc-glass-bg: rgba(30, 36, 51, 0.9);
    --gc-glass-border: rgba(255, 255, 255, 0.08);
    --gc-glass-blur: blur(20px);
}


/* ============================================================
   2. LIGHT THEME
   ============================================================ */
[data-theme="light"],
.gc-theme-light {
    --gc-bg-app: #f1f5f9;
    --gc-bg-panel: #ffffff;
    --gc-bg-elevated: #f8fafc;
    --gc-bg-input: rgba(0, 0, 0, 0.05);
    --gc-bg-hover: rgba(0, 0, 0, 0.05);

    --gc-text-primary: #1e293b;
    --gc-text-secondary: #475569;
    --gc-text-muted: #94a3b8;
    --gc-text-inverse: #ffffff;

    --gc-border-subtle: rgba(0, 0, 0, 0.06);
    --gc-border-default: rgba(0, 0, 0, 0.12);
    --gc-border-strong: rgba(0, 0, 0, 0.2);

    --gc-glass-bg: rgba(255, 255, 255, 0.9);
    --gc-glass-border: rgba(0, 0, 0, 0.08);

    --gc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --gc-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --gc-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}


/* ============================================================
   3. LEAGUE WHITE-LABEL SUPPORT
   ============================================================

   Leagues can override accent colors in two ways:

   Option A: Data attribute on <html> or <body>
   <html data-league="tustin-tigers">

   Option B: Inline CSS variables (set via JS from Supabase)
   document.documentElement.style.setProperty('--gc-accent', '#2d7a3e');

   ============================================================ */

/* Example league theme - Tustin Tigers */
[data-league="tustin-tigers"] {
    --gc-accent: #2d7a3e;
    --gc-accent-dark: #1e5a2a;
    --gc-accent-glow: rgba(45, 122, 62, 0.3);
    --gc-accent-subtle: rgba(45, 122, 62, 0.1);
}

/* The JS helper to apply league branding:

   function applyLeagueBranding(league) {
       if (!league) return;
       const root = document.documentElement;
       if (league.primary_color) {
           root.style.setProperty('--gc-accent', league.primary_color);
           root.style.setProperty('--gc-accent-dark', darken(league.primary_color, 15));
           root.style.setProperty('--gc-accent-glow', league.primary_color + '4D'); // 30% opacity
           root.style.setProperty('--gc-accent-subtle', league.primary_color + '1A'); // 10% opacity
       }
       if (league.secondary_color) {
           root.style.setProperty('--gc-secondary', league.secondary_color);
       }
       if (league.font_family) {
           root.style.setProperty('--gc-font-display', league.font_family);
       }
   }
*/


/* ============================================================
   4. COMPONENT: MODALS
   ============================================================ */

/* Modal Backdrop */
.gc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: var(--gc-glass-blur);
    -webkit-backdrop-filter: var(--gc-glass-blur);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--gc-z-modal);
    padding: var(--gc-space-lg);
    animation: gc-fadeIn var(--gc-transition-fast) ease-out;
}

.gc-modal-backdrop.active,
.gc-modal-backdrop.show {
    display: flex;
}

/* Modal Container */
.gc-modal {
    background: linear-gradient(135deg, var(--gc-bg-elevated), var(--gc-bg-panel));
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--gc-shadow-lg), 0 0 0 1px var(--gc-glass-border);
    animation: gc-slideUp var(--gc-transition-bounce);
}

.gc-modal--sm { max-width: 360px; }
.gc-modal--md { max-width: 480px; }
.gc-modal--lg { max-width: 640px; }
.gc-modal--xl { max-width: 800px; }
.gc-modal--full { max-width: 95vw; max-height: 95vh; }

/* Modal Header */
.gc-modal-header {
    padding: var(--gc-space-lg);
    border-bottom: 1px solid var(--gc-border-subtle);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-modal-title {
    font-family: var(--gc-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gc-text-primary);
    margin: 0;
}

.gc-modal-close {
    background: none;
    border: none;
    color: var(--gc-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--gc-space-xs);
    line-height: 1;
    transition: color var(--gc-transition-fast);
}

.gc-modal-close:hover {
    color: var(--gc-text-primary);
}

/* Modal Body */
.gc-modal-body {
    padding: var(--gc-space-xl);
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

/* Modal Footer */
.gc-modal-footer {
    padding: var(--gc-space-lg);
    border-top: 1px solid var(--gc-border-subtle);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    gap: var(--gc-space-md);
    justify-content: flex-end;
}

.gc-modal-footer--split {
    justify-content: space-between;
}


/* ============================================================
   5. COMPONENT: FORM INPUTS
   ============================================================ */

/* Input Group (label + input + helper) */
.gc-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-sm);
    margin-bottom: var(--gc-space-lg);
}

.gc-input-group:last-child {
    margin-bottom: 0;
}

/* Labels - WHITE and LARGER for visibility */
.gc-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gc-text-primary);
    text-transform: uppercase;
    font-family: var(--gc-font-display);
}

/* Smaller muted label variant */
.gc-label--muted {
    font-size: 0.75rem;
    color: var(--gc-text-muted);
    letter-spacing: 1px;
}

.gc-label--required::after {
    content: ' *';
    color: var(--gc-error);
}

/* Input Wrapper (for icons) */
.gc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Text Input */
.gc-input {
    width: 100%;
    background: var(--gc-bg-input);
    border: 2px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    padding: 14px 16px;
    font-family: var(--gc-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gc-text-primary);
    transition: all var(--gc-transition-normal);
    outline: none;
}

.gc-input::placeholder {
    color: var(--gc-text-muted);
    font-weight: 400;
}

.gc-input:hover {
    border-color: var(--gc-border-default);
}

.gc-input:focus {
    border-color: var(--gc-accent);
    box-shadow: 0 0 0 3px var(--gc-accent-subtle);
}

.gc-input--error {
    border-color: var(--gc-error);
}

.gc-input--error:focus {
    box-shadow: 0 0 0 3px var(--gc-error-bg);
}

.gc-input--success {
    border-color: var(--gc-success);
}

/* Date/Time inputs - ensure iOS Safari respects styling */
input[type="date"].gc-input,
input[type="time"].gc-input,
input[type="datetime-local"].gc-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 52px;
    background: var(--gc-bg-input);
    border: 2px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    padding: 14px 16px;
    font-family: var(--gc-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gc-text-primary);
    box-sizing: border-box;
}

input[type="date"].gc-input:focus,
input[type="time"].gc-input:focus,
input[type="datetime-local"].gc-input:focus {
    border-color: var(--gc-accent);
    box-shadow: 0 0 0 3px var(--gc-accent-subtle);
    outline: none;
}

/* Input with Icon */
.gc-input--with-icon {
    padding-right: 48px;
}

.gc-input-icon {
    position: absolute;
    right: 14px;
    color: var(--gc-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color var(--gc-transition-fast);
}

.gc-input-icon:hover {
    color: var(--gc-text-primary);
}

/* Textarea */
.gc-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Select */
.gc-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
    cursor: pointer;
}

/* Helper Text */
.gc-helper {
    font-size: 0.85rem;
    color: var(--gc-text-muted);
}

.gc-helper--error {
    color: var(--gc-error);
}


/* ============================================================
   6. COMPONENT: BUTTONS
   ============================================================ */

/* Base Button */
.gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gc-space-sm);
    padding: 14px 24px;
    border: none;
    border-radius: var(--gc-radius-md);
    font-family: var(--gc-font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--gc-transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.gc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary Button (Accent Color) */
.gc-btn--primary {
    background: linear-gradient(135deg, var(--gc-accent), var(--gc-accent-dark));
    color: var(--gc-text-inverse);
    box-shadow: 0 4px 15px var(--gc-accent-glow);
}

.gc-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gc-accent-glow);
}

/* Secondary Button */
.gc-btn--secondary {
    background: linear-gradient(135deg, var(--gc-secondary), var(--gc-secondary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--gc-secondary-glow);
}

.gc-btn--secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gc-secondary-glow);
}

/* Danger Button */
.gc-btn--danger {
    background: linear-gradient(135deg, var(--gc-error), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.gc-btn--danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Ghost Button (Outline) */
.gc-btn--ghost {
    background: transparent;
    border: 2px solid var(--gc-border-default);
    color: var(--gc-text-secondary);
}

.gc-btn--ghost:hover:not(:disabled) {
    background: var(--gc-bg-hover);
    border-color: var(--gc-border-strong);
    color: var(--gc-text-primary);
}

/* Ghost Accent */
.gc-btn--ghost-accent {
    background: transparent;
    border: 2px solid var(--gc-accent);
    color: var(--gc-accent);
}

.gc-btn--ghost-accent:hover:not(:disabled) {
    background: var(--gc-accent-subtle);
}

/* Link Button */
.gc-btn--link {
    background: transparent;
    color: var(--gc-accent);
    padding: var(--gc-space-sm);
    text-transform: none;
    letter-spacing: 0;
}

.gc-btn--link:hover:not(:disabled) {
    text-decoration: underline;
}

/* Button Sizes */
.gc-btn--sm {
    padding: 10px 16px;
    font-size: 0.875rem;
}

.gc-btn--lg {
    padding: 18px 32px;
    font-size: 1.125rem;
}

.gc-btn--full {
    width: 100%;
}

/* Button with Spinner */
.gc-btn .gc-spinner {
    display: none;
}

.gc-btn.loading .gc-btn-content {
    visibility: hidden;
}

.gc-btn.loading .gc-spinner {
    display: block;
    position: absolute;
}


/* ============================================================
   7. COMPONENT: MESSAGES / ALERTS
   ============================================================ */

.gc-msg {
    display: flex;
    align-items: flex-start;
    gap: var(--gc-space-md);
    padding: 14px 16px;
    border-radius: var(--gc-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
}

.gc-msg--error {
    background: var(--gc-error-bg);
    border: 1px solid var(--gc-error-border);
    color: var(--gc-error);
}

.gc-msg--success {
    background: var(--gc-success-bg);
    border: 1px solid var(--gc-success-border);
    color: var(--gc-success);
}

.gc-msg--warning {
    background: var(--gc-warning-bg);
    border: 1px solid var(--gc-warning-border);
    color: var(--gc-warning);
}

.gc-msg--info {
    background: var(--gc-info-bg);
    border: 1px solid var(--gc-info-border);
    color: var(--gc-info);
}

.gc-msg-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}


/* ============================================================
   8. COMPONENT: TABS
   ============================================================ */

.gc-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--gc-radius-md);
    padding: 4px;
    gap: 4px;
}

.gc-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--gc-radius-sm);
    font-family: var(--gc-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gc-text-muted);
    cursor: pointer;
    transition: all var(--gc-transition-normal);
    text-transform: uppercase;
}

.gc-tab:hover:not(.active) {
    color: var(--gc-text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.gc-tab.active {
    background: linear-gradient(135deg, var(--gc-accent), var(--gc-accent-dark));
    color: var(--gc-text-inverse);
    box-shadow: 0 2px 8px var(--gc-accent-glow);
}

/* Larger tabs for better visibility */
.gc-tabs--lg .gc-tab {
    padding: 16px 24px;
    font-size: 1.1rem;
}


/* ============================================================
   9. COMPONENT: CARDS
   ============================================================ */

.gc-card {
    background: var(--gc-glass-bg);
    border: 1px solid var(--gc-glass-border);
    border-radius: var(--gc-radius-xl);
    padding: var(--gc-space-xl);
    backdrop-filter: var(--gc-glass-blur);
    -webkit-backdrop-filter: var(--gc-glass-blur);
    box-shadow: var(--gc-shadow-md);
}

.gc-card--clickable {
    cursor: pointer;
    transition: all var(--gc-transition-bounce);
}

.gc-card--clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--gc-shadow-lg);
    border-color: var(--gc-accent);
}


/* ============================================================
   10. COMPONENT: SPINNER
   ============================================================ */

.gc-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gc-border-default);
    border-top-color: var(--gc-accent);
    border-radius: 50%;
    animation: gc-spin 0.8s linear infinite;
}

.gc-spinner--sm { width: 14px; height: 14px; border-width: 2px; }
.gc-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.gc-spinner--xl { width: 48px; height: 48px; border-width: 4px; }

.gc-spinner--inverse {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: white;
}


/* ============================================================
   11. COMPONENT: DIVIDERS
   ============================================================ */

.gc-divider {
    display: flex;
    align-items: center;
    gap: var(--gc-space-md);
    color: var(--gc-text-muted);
    font-size: 0.8rem;
    margin: var(--gc-space-lg) 0;
}

.gc-divider::before,
.gc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gc-border-subtle);
}

.gc-divider--simple::before,
.gc-divider--simple::after {
    display: none;
}

.gc-divider--simple {
    height: 1px;
    background: var(--gc-border-subtle);
}


/* ============================================================
   12. ANIMATIONS
   ============================================================ */

@keyframes gc-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gc-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes gc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes gc-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* ============================================================
   13. UTILITY CLASSES
   ============================================================ */

/* Display */
.gc-hidden { display: none !important; }
.gc-flex { display: flex; }
.gc-flex-col { flex-direction: column; }
.gc-items-center { align-items: center; }
.gc-justify-center { justify-content: center; }
.gc-justify-between { justify-content: space-between; }
.gc-gap-sm { gap: var(--gc-space-sm); }
.gc-gap-md { gap: var(--gc-space-md); }
.gc-gap-lg { gap: var(--gc-space-lg); }

/* Spacing */
.gc-mt-sm { margin-top: var(--gc-space-sm); }
.gc-mt-md { margin-top: var(--gc-space-md); }
.gc-mt-lg { margin-top: var(--gc-space-lg); }
.gc-mt-xl { margin-top: var(--gc-space-xl); }
.gc-mt-2xl { margin-top: var(--gc-space-2xl); }
.gc-mb-sm { margin-bottom: var(--gc-space-sm); }
.gc-mb-md { margin-bottom: var(--gc-space-md); }
.gc-mb-lg { margin-bottom: var(--gc-space-lg); }
.gc-mb-xl { margin-bottom: var(--gc-space-xl); }
.gc-my-lg { margin-top: var(--gc-space-lg); margin-bottom: var(--gc-space-lg); }
.gc-my-xl { margin-top: var(--gc-space-xl); margin-bottom: var(--gc-space-xl); }

/* Text */
.gc-text-center { text-align: center; }
.gc-text-muted { color: var(--gc-text-muted); }
.gc-text-primary { color: var(--gc-text-primary); }
.gc-text-secondary { color: var(--gc-text-secondary); }
.gc-text-sm { font-size: 0.875rem; }
.gc-text-lg { font-size: 1.125rem; }
.gc-text-xl { font-size: 1.25rem; }

/* ============================================================
   FORM LAYOUT UTILITIES
   Use these for consistent form field layouts
   ============================================================ */

/* Form rows - side-by-side fields */
.gc-form-row {
    display: grid;
    gap: 12px;
}
.gc-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.gc-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
/* Address row: City (2fr) + State (1fr) + ZIP (1fr) */
.gc-form-row-address {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

/* Stack on mobile */
@media (max-width: 480px) {
    .gc-form-row-2,
    .gc-form-row-3,
    .gc-form-row-address {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MODAL SCROLL BEHAVIOR
   Body locks when modal is open, only modal content scrolls
   ============================================================ */

/* Add this class to body when modal opens */
body.gc-modal-open {
    overflow: hidden;
}

/* Modal backdrop - scroll behavior when active */
.gc-modal-backdrop.active,
.gc-modal-backdrop.show {
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: var(--gc-space-lg) var(--gc-space-md);
}

/* Modal itself shouldn't scroll, content does */
.gc-modal {
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}

.gc-modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Important for flex scroll */
}


/* ============================================================
   14. RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 640px) {
    .gc-modal {
        margin: var(--gc-space-md);
        max-height: calc(100vh - 32px);
    }

    .gc-modal-body {
        padding: var(--gc-space-lg);
    }

    .gc-modal-footer {
        flex-direction: column;
    }

    .gc-btn--full-mobile {
        width: 100%;
    }
}
