/* Design System - CSS Variables and Theme
 * Modern UI Redesign (006-modern-ui)
 * Extends Pico CSS with custom brand colors and design tokens
 */

:root {
    /* ===== Color Palette ===== */

    /* Primary Brand Color */
    --primary: #4f46e5;
    /* Indigo - primary actions, links */
    --primary-hover: #4338ca;
    /* Darker indigo for hover states */
    --primary-focus: rgba(79, 70, 229, 0.125);
    /* Focus ring */

    /* Status Colors - Scraper States */
    --success: #10b981;
    /* Green - active scrapers, successful runs */
    --success-hover: #059669;
    --warning: #f59e0b;
    /* Amber - warnings, pending states */
    --warning-hover: #d97706;
    --error: #ef4444;
    /* Red - errors, failed runs */
    --error-hover: #dc2626;
    --info: #3b82f6;
    /* Blue - informational messages */
    --info-hover: #2563eb;

    /* Neutral Scale - Backgrounds, Borders, Text */
    --muted: #6b7280;
    /* Gray-500 - muted text */
    --muted-border: #d1d5db;
    /* Gray-300 - borders */
    --card-background-color: #ffffff;
    --card-border-color: #e5e7eb;
    /* Gray-200 */

    /* Typography */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size: 16px;
    --line-height: 1.6;

    /* Spacing Scale (consistent with Pico) */
    --spacing: 1rem;
    --spacing-company: 0.5rem;
    /* Compact spacing */
    --spacing-section: 2rem;
    /* Section spacing */

    /* Border Radius */
    --border-radius: 0.5rem;
    /* 8px - cards, buttons */
    --border-radius-small: 0.25rem;
    /* 4px - badges, small elements */

    /* Shadows */
    --box-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-speed: 150ms;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --card-background-color: #1f2937;
    /* Gray-800 */
    --card-border-color: #374151;
    /* Gray-700 */
    --muted: #9ca3af;
    /* Gray-400 */
    --muted-border: #4b5563;
    /* Gray-600 */
}

/* ===== Typography Scale ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem;
}

/* 36px */
h2 {
    font-size: 1.875rem;
}

/* 30px */
h3 {
    font-size: 1.5rem;
}

/* 24px */
h4 {
    font-size: 1.25rem;
}

/* 20px */
h5 {
    font-size: 1.125rem;
}

/* 18px */
h6 {
    font-size: 1rem;
}

/* 16px */

/* ===== Utility Classes ===== */

/* Text Colors */
.text-muted {
    color: var(--muted);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

.text-info {
    color: var(--info);
}

/* Background Colors */
.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-error-light {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Spacing Utilities */
.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--spacing-company);
}

.mt-2 {
    margin-top: var(--spacing);
}

.mt-3 {
    margin-top: var(--spacing-section);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--spacing-company);
}

.mb-2 {
    margin-bottom: var(--spacing);
}

.mb-3 {
    margin-bottom: var(--spacing-section);
}

/* ===== Transitions ===== */

button,
a,
[role="button"] {
    transition: all var(--transition-speed) var(--transition-timing);
}

/* ===== Focus Styles ===== */

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

/* ===== Container ===== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}