/* ========================================
   Auto Claude - Design System Tokens
   iOS 17 Design Language | Modern Minimalism
   ======================================== */

/* ==========================================
   1. COLOR PALETTE
   ----------------------------------------
   iOS 17 inspired color system with
   semantic naming for consistency
   ========================================== */

:root {
    /* -------- Primary Colors -------- */
    /* Ana marka rengi - iOS Blue */
    --color-primary: #0a84ff;
    --color-primary-hover: #409cff;
    --color-primary-active: #0071e3;
    --color-primary-muted: rgba(10, 132, 255, 0.15);
    --color-primary-subtle: rgba(10, 132, 255, 0.08);

    /* -------- Semantic Colors -------- */
    /* Success - iOS Green */
    --color-success: #30d158;
    --color-success-hover: #4ade80;
    --color-success-muted: rgba(48, 209, 88, 0.15);
    --color-success-subtle: rgba(48, 209, 88, 0.08);

    /* Warning - iOS Orange */
    --color-warning: #ff9f0a;
    --color-warning-hover: #ffb340;
    --color-warning-muted: rgba(255, 159, 10, 0.15);
    --color-warning-subtle: rgba(255, 159, 10, 0.08);

    /* Danger/Error - iOS Red */
    --color-danger: #ff453a;
    --color-danger-hover: #ff6961;
    --color-danger-muted: rgba(255, 69, 58, 0.15);
    --color-danger-subtle: rgba(255, 69, 58, 0.08);

    /* Info - iOS Cyan */
    --color-info: #64d2ff;
    --color-info-hover: #8ae0ff;
    --color-info-muted: rgba(100, 210, 255, 0.15);
    --color-info-subtle: rgba(100, 210, 255, 0.08);

    /* -------- Accent Colors -------- */
    /* Mor - iOS Purple */
    --color-purple: #bf5af2;
    --color-purple-muted: rgba(191, 90, 242, 0.15);

    /* Pembe - iOS Pink */
    --color-pink: #ff375f;
    --color-pink-muted: rgba(255, 55, 95, 0.15);

    /* Indigo */
    --color-indigo: #5e5ce6;
    --color-indigo-muted: rgba(94, 92, 230, 0.15);

    /* Teal */
    --color-teal: #30b0c7;
    --color-teal-muted: rgba(48, 176, 199, 0.15);

    /* -------- Surface Colors (Dark Mode) -------- */
    --surface-primary: #000000;
    --surface-secondary: #1c1c1e;
    --surface-tertiary: #2c2c2e;
    --surface-quaternary: #3a3a3c;
    --surface-elevated: #48484a;

    /* Glass Surface */
    --surface-glass: rgba(44, 44, 46, 0.72);
    --surface-glass-hover: rgba(58, 58, 60, 0.8);
    --surface-glass-active: rgba(72, 72, 74, 0.85);

    /* -------- Text Colors -------- */
    --text-primary: #f5f5f7;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-quaternary: rgba(255, 255, 255, 0.35);
    --text-disabled: rgba(255, 255, 255, 0.25);

    /* Inverted Text (for light surfaces) */
    --text-inverted: #1d1d1f;
    --text-inverted-secondary: rgba(0, 0, 0, 0.7);

    /* -------- Border Colors -------- */
    --border-primary: rgba(255, 255, 255, 0.15);
    --border-secondary: rgba(255, 255, 255, 0.1);
    --border-tertiary: rgba(255, 255, 255, 0.06);
    --border-focus: var(--color-primary);

    /* -------- Fill Colors -------- */
    --fill-primary: rgba(255, 255, 255, 0.1);
    --fill-secondary: rgba(255, 255, 255, 0.08);
    --fill-tertiary: rgba(255, 255, 255, 0.06);
    --fill-quaternary: rgba(255, 255, 255, 0.04);

    /* -------- Separator -------- */
    --separator: rgba(255, 255, 255, 0.08);
    --separator-opaque: #38383a;
}

/* ==========================================
   2. TYPOGRAPHY SYSTEM
   ----------------------------------------
   Apple San Francisco Pro inspired
   type scale with optical sizing
   ========================================== */

:root {
    /* -------- Font Families -------- */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'SF Mono', 'Roboto Mono', 'Menlo', 'Monaco', 'Courier New', monospace;

    /* -------- Font Sizes -------- */
    /* Display - Hero text */
    --text-display: 2.5rem;      /* 40px */
    --text-display-sm: 2rem;     /* 32px */

    /* Headings */
    --text-h1: 1.75rem;          /* 28px */
    --text-h2: 1.375rem;         /* 22px */
    --text-h3: 1.125rem;         /* 18px */
    --text-h4: 1rem;             /* 16px */
    --text-h5: 0.9375rem;        /* 15px */
    --text-h6: 0.875rem;         /* 14px */

    /* Body */
    --text-body-lg: 1rem;        /* 16px */
    --text-body: 0.9375rem;      /* 15px */
    --text-body-sm: 0.875rem;    /* 14px */
    --text-body-xs: 0.8125rem;   /* 13px */

    /* UI Elements */
    --text-label: 0.75rem;       /* 12px */
    --text-caption: 0.6875rem;   /* 11px */
    --text-micro: 0.625rem;      /* 10px */

    /* -------- Line Heights -------- */
    --leading-none: 1;
    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;
    --leading-loose: 1.8;

    /* -------- Font Weights -------- */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* -------- Letter Spacing -------- */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

/* ==========================================
   3. SPACING SCALE
   ----------------------------------------
   4px grid system for consistent
   spatial rhythm throughout UI
   ========================================== */

:root {
    /* -------- Base Unit -------- */
    --spacing-unit: 4px;

    /* -------- Spacing Scale -------- */
    --space-0: 0;
    --space-1: 4px;              /* 1 unit */
    --space-2: 8px;              /* 2 units */
    --space-3: 12px;             /* 3 units */
    --space-4: 16px;             /* 4 units */
    --space-5: 20px;             /* 5 units */
    --space-6: 24px;             /* 6 units */
    --space-8: 32px;             /* 8 units */
    --space-10: 40px;            /* 10 units */
    --space-12: 48px;            /* 12 units */
    --space-16: 64px;            /* 16 units */
    --space-20: 80px;            /* 20 units */
    --space-24: 96px;            /* 24 units */

    /* -------- Semantic Spacing -------- */
    /* Component internal padding */
    --padding-xs: var(--space-1);
    --padding-sm: var(--space-2);
    --padding-md: var(--space-3);
    --padding-lg: var(--space-4);
    --padding-xl: var(--space-6);

    /* Component gaps */
    --gap-xs: var(--space-1);
    --gap-sm: var(--space-2);
    --gap-md: var(--space-3);
    --gap-lg: var(--space-4);
    --gap-xl: var(--space-6);

    /* Section spacing */
    --section-gap-sm: var(--space-4);
    --section-gap-md: var(--space-6);
    --section-gap-lg: var(--space-8);
}

/* ==========================================
   4. SHADOW SYSTEM
   ----------------------------------------
   Multi-layer shadows for depth hierarchy
   iOS-style soft shadows
   ========================================== */

:root {
    /* -------- Elevation Shadows -------- */
    /* Level 0 - No shadow */
    --shadow-none: none;

    /* Level 1 - Subtle lift (cards, inputs) */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3),
                 0 1px 3px rgba(0, 0, 0, 0.15);

    /* Level 2 - Small elevation (dropdowns, tooltips) */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25),
                 0 4px 8px rgba(0, 0, 0, 0.15);

    /* Level 3 - Medium elevation (modals, popovers) */
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3),
                 0 8px 16px rgba(0, 0, 0, 0.2);

    /* Level 4 - High elevation (sheets, dialogs) */
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.35),
                 0 16px 32px rgba(0, 0, 0, 0.25);

    /* Level 5 - Highest elevation (fullscreen overlays) */
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.4),
                 0 24px 48px rgba(0, 0, 0, 0.3);

    /* -------- Special Shadows -------- */
    /* Glow shadows for interactive elements */
    --shadow-glow-primary: 0 0 20px rgba(10, 132, 255, 0.4);
    --shadow-glow-success: 0 0 20px rgba(48, 209, 88, 0.4);
    --shadow-glow-warning: 0 0 20px rgba(255, 159, 10, 0.4);
    --shadow-glow-danger: 0 0 20px rgba(255, 69, 58, 0.4);

    /* Inner shadows for pressed states */
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-inner-lg: inset 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   5. BORDER RADIUS
   ----------------------------------------
   Consistent radius scale matching
   iOS design language
   ========================================== */

:root {
    /* -------- Radius Scale -------- */
    --radius-none: 0;
    --radius-xs: 4px;            /* Small pills, badges */
    --radius-sm: 6px;            /* Inputs, small buttons */
    --radius-md: 8px;            /* Standard buttons */
    --radius-lg: 10px;           /* Cards, dialogs */
    --radius-xl: 12px;           /* Larger cards */
    --radius-2xl: 14px;          /* iOS-style cards */
    --radius-3xl: 16px;          /* Chat bubbles */
    --radius-4xl: 20px;          /* Sheet corners */
    --radius-full: 9999px;       /* Pills, avatars */

    /* -------- Semantic Radius -------- */
    --radius-button: var(--radius-lg);
    --radius-input: var(--radius-md);
    --radius-card: var(--radius-2xl);
    --radius-modal: var(--radius-4xl);
    --radius-pill: var(--radius-full);
    --radius-tag: var(--radius-sm);
}

/* ==========================================
   6. ANIMATION TOKENS
   ----------------------------------------
   Smooth, natural-feeling animations
   iOS spring physics inspired
   ========================================== */

:root {
    /* -------- Duration -------- */
    --duration-instant: 50ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;
    --duration-slower: 500ms;
    --duration-slowest: 700ms;

    /* -------- Easing Curves -------- */
    /* Standard easing */
    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* iOS-style spring easing */
    --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Expressive easing for emphasis */
    --ease-expressive: cubic-bezier(0.87, 0, 0.13, 1);
    --ease-decelerate: cubic-bezier(0, 0.55, 0.45, 1);
    --ease-accelerate: cubic-bezier(0.55, 0, 1, 0.45);

    /* -------- Common Transitions -------- */
    --transition-fast: var(--duration-fast) var(--ease-out);
    --transition-normal: var(--duration-normal) var(--ease-out);
    --transition-slow: var(--duration-slow) var(--ease-out);
    --transition-spring: var(--duration-normal) var(--ease-spring);
    --transition-bounce: var(--duration-slow) var(--ease-spring-bounce);
}

/* ==========================================
   7. GLASSMORPHISM
   ----------------------------------------
   Frosted glass effects with
   backdrop blur and subtle gradients
   ========================================== */

:root {
    /* -------- Blur Levels -------- */
    --blur-none: 0;
    --blur-sm: 4px;
    --blur-md: 8px;
    --blur-lg: 12px;
    --blur-xl: 16px;
    --blur-2xl: 20px;
    --blur-3xl: 24px;
    --blur-max: 40px;

    /* -------- Glass Backgrounds -------- */
    /* Standard glass */
    --glass-bg: rgba(44, 44, 46, 0.72);
    --glass-bg-light: rgba(58, 58, 60, 0.65);
    --glass-bg-dark: rgba(28, 28, 30, 0.85);

    /* Tinted glass */
    --glass-primary: rgba(10, 132, 255, 0.12);
    --glass-success: rgba(48, 209, 88, 0.12);
    --glass-warning: rgba(255, 159, 10, 0.12);
    --glass-danger: rgba(255, 69, 58, 0.12);

    /* -------- Glass Borders -------- */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.15);

    /* -------- Glass Gradients -------- */
    --glass-gradient: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );

    --glass-gradient-subtle: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0) 100%
    );

    /* -------- Noise Texture -------- */
    /* SVG noise for subtle texture */
    --noise-subtle: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================
   8. Z-INDEX SCALE
   ----------------------------------------
   Predictable layering system
   for stacking contexts
   ========================================== */

:root {
    --z-below: -1;
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-notification: 800;
    --z-max: 9999;
}

/* ==========================================
   9. BREAKPOINTS
   ----------------------------------------
   Mobile-first responsive breakpoints
   ========================================== */

:root {
    --breakpoint-xs: 320px;
    --breakpoint-sm: 480px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* ==========================================
   10. COMPONENT TOKENS
   ----------------------------------------
   Pre-composed tokens for
   common component patterns
   ========================================== */

:root {
    /* -------- Interactive Elements -------- */
    --touch-target-min: 44px;
    --focus-ring: 0 0 0 3px var(--color-primary-muted);

    /* -------- Input Fields -------- */
    --input-height-sm: 32px;
    --input-height-md: 40px;
    --input-height-lg: 48px;

    /* -------- Button Sizes -------- */
    --button-height-sm: 32px;
    --button-height-md: 40px;
    --button-height-lg: 48px;
    --button-height-xl: 56px;

    /* -------- Icon Sizes -------- */
    --icon-xs: 12px;
    --icon-sm: 14px;
    --icon-md: 16px;
    --icon-lg: 20px;
    --icon-xl: 24px;
    --icon-2xl: 32px;

    /* -------- Avatar Sizes -------- */
    --avatar-xs: 24px;
    --avatar-sm: 32px;
    --avatar-md: 40px;
    --avatar-lg: 48px;
    --avatar-xl: 64px;
}

/* ==========================================
   KEYFRAME ANIMATIONS
   ----------------------------------------
   Reusable animation definitions
   ========================================== */

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

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

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

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