/*
===============================================================================
CSS VARIABLES, RESET STYLES, AND BASE TYPOGRAPHY
===============================================================================

PURPOSE:
Foundation layer - CSS custom properties, global resets, base element styling

WHEN TO USE THIS FILE:
- When adding/modifying css variables, reset styles, and base typography
- When working with foundational styling elements
- When foundation layer - css custom properties, global resets, base element styling

LOAD ORDER: This file loads in position 1 of 6
- Loaded after: none
- Loaded before: layout, components, auth, pages, utilities

DEPENDENCIES:
- Requires: base.css variables (if not base.css itself)
- Required by: All subsequent CSS files

Generated: 2025-09-04 16:59:11
Original file: common.css (119677 bytes)
===============================================================================

CSS ARCHITECTURE RULES:
- This file contains COMMON rules used by both mobile AND desktop
- Mobile-specific rules are in mobile.css (max-width: 1339px)
- Desktop-specific rules are in desktop.css (min-width: 1340px)
- Rule migration logic:
  * If common rule exists + mobile rule exists + desktop rule missing → Copy common to desktop, remove from common
  * If common rule exists + desktop rule exists + mobile rule missing → Copy common to mobile, remove from common  
  * If common rule exists + both mobile and desktop rules exist → Remove from common
  * If common rule exists + neither mobile nor desktop rules exist → Keep in common
- Mobile and desktop rules never overlap due to media queries, avoiding inheritance issues

PROPERTY-LEVEL MIGRATION:
- When moving rules from common to mobile/desktop, verify ALL CSS properties are accounted for
- Compare each property: common vs mobile vs desktop
- Copy missing properties from common to target file(s)
- Only remove common rule after all properties are properly migrated
- If conflicting values exist, keep the specific (mobile/desktop) value
- Merge properties into existing rules, don't create duplicate rules
*/

/* REMOVED: body.user-logged-in overflow rules - migrated to mobile.css and desktop.css */

body.modal-open {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use position:fixed instead of overflow:hidden to prevent background scrolling */
    /* This approach doesn't break sticky positioning on mobile Safari */
}

/* REMOVED: body:not(.user-logged-in) overflow rules - migrated to mobile.css and desktop.css */

.btn:disabled, input:disabled, select:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.user-logged-in .legal-sections {
    display: block !important;
    z-index: 1 !important;
}

body:not(.user-logged-in) .legal-sections {
    display: block !important;
    z-index: 1 !important;
}

body:not(.user-logged-in) .chat-input-wrapper[style*="display: none"] {
    display: none !important;
}

body.user-logged-in .main-content {
    height: calc(100vh - 60px);
    min-height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    /* Main content stays fixed size, page scrolls to reveal legal sections below */
}

/* Override fixed height for pages without chat content (about, premium) */
body.user-logged-in .main-content:not(:has(.chat-container)):not(:has(.chat-placeholder-container)) {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body:not(.user-logged-in) .mobile-tabs {
        display: none; /* Remove !important to allow JS override */
        visibility: hidden;
    }

body:not(.user-logged-in) .mobile-tabs[style*="display: flex"] {
        display: flex !important;
        visibility: visible !important;
    }

.whiteboard-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.user-logged-in #clear-whiteboard-form {
    display: block;
}

#clear-conversation-form {
    display: none; /* Hidden by default, JavaScript will control visibility */
}

body:not(.user-logged-in) #clear-conversation-form {
    display: none;
}

body:not(.user-logged-in) .main-content {
    /* REMOVED: z-index and position - These create stacking context that breaks mobile sticky positioning */
    height: auto !important; /* Allow natural height when not logged in */
}

body:not(.user-logged-in) .app-header {
    z-index: 1000 !important; /* CRITICAL: Consistent z-index with other header rules */
}

body:not(.user-logged-in) .input-container {
    scroll-margin-top: 0 !important;
    scroll-padding-top: 0 !important;
}

body.user-logged-in .welcome-content-container {
    display: none !important;
}

/* REMOVED: body:not(.user-logged-in) .main-content overflow rules - migrated to mobile.css and desktop.css */

/* REMOVED: body.user-logged-in .main-content overflow rules - migrated to mobile.css and desktop.css */

:root {
    /* Colors */
    --primary-color: #7c5dfa;
    --primary-hover: #6b4de6;
    --secondary-color: #2c3e50;
    --background-color: #ffffff;
    --chat-bg: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
    
    /* 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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    /* REMOVED: overflow: auto - migrated to mobile.css and desktop.css */
    font-size: 16px;
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

body, html {
        max-width: 100vw;
        box-sizing: border-box;
        /* overflow-x: hidden moved to mobile.css and desktop.css */
    }

html {
}

/* Disable smooth scrolling only for anchor link navigation */
html:target {
    scroll-behavior: auto;
}

.anchor::before {
    content: "";
    display: block;
    height: 140px;
    margin-top: -100px;
    margin-bottom: -20px;
}

.clerk-auth-container[style*="display: flex"] {
    display: flex !important;
}

