/* ============================================
   VYTARA CLIENT - MAIN STYLESHEET
   Global Styles, CSS Variables, Reset
   ============================================ */

/* CSS VARIABLES */
:root {
    /* Alpine Green Colors */
    --color-alpine-darkest: #1A2B1F;
    --color-alpine-darker: #2D4A38;
    --color-alpine-dark: #3D6B4F;
    --color-alpine-medium: #5E8A6E;
    --color-alpine-light: #8DA393;
    --color-alpine-lighter: #A5C4A8;
    --color-alpine-lightest: #C8E0CC;
    
    /* Accent Colors */
    --color-blue-primary: #185FA5;
    --color-blue-light: #2A7AC2;
    --color-teal-primary: #1D9E75;
    --color-teal-light: #5DCAA5;
    
    /* Badge Gradients */
    --gradient-streak: linear-gradient(135deg, #1D9E75 0%, #5DCAA5 100%);
    --gradient-volume: linear-gradient(135deg, #D85A30 0%, #F0997B 100%);
    --gradient-pr: linear-gradient(135deg, #D4537E 0%, #F4C0D1 100%);
    --gradient-consistency: linear-gradient(135deg, #534AB7 0%, #AFA9EC 100%);
    --gradient-special: linear-gradient(135deg, #C4A535 0%, #F5E6A8 100%);
    
    /* Status Colors */
    --color-success: #1D9E75;
    --color-warning: #D85A30;
    --color-error: #E24B4A;
    --color-info: #185FA5;
    
    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 14px;
    --radius-3xl: 18px;
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-floating: 0 4px 12px rgba(45, 74, 56, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
}

/* ============================================
   CSS RESET
   ============================================ */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-gray-900);
    background: var(--color-gray-50);
    min-height: 100vh;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* ============================================
   FOCUS STYLES
   ============================================ */

*:focus-visible {
    outline: 2px solid var(--color-blue-primary);
    outline-offset: 2px;
}

/* ============================================
   SELECTION
   ============================================ */

::selection {
    background: rgba(45, 74, 56, 0.2);
    color: var(--color-gray-900);
}

/* ============================================
   APP CONTAINER
   ============================================ */

.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    padding-bottom: 100px; /* Space for FAB */
}

/* ============================================
   LOADING SPINNER (Reusable)
   ============================================ */

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-alpine-darker);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.hidden {
    display: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 640px) {
    .app-container {
        padding: 1.25rem;
    }
    
    body {
        font-size: 14px;
    }
}

@media (min-width: 641px) {
    .app-container {
        padding: 2rem;
    }
}
