/**
 * Theme CSS Variables - The Legal Hump
 * Supports light (default) and dark mode
 */

:root {
    /* Light Mode Colors (Default) */
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #616161;
    --text-muted: #757575;
    --text-light: #9e9e9e;

    --border-color: rgba(255, 255, 255, 0.3);
    --border-subtle: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.08);

    /* Gradient overlay for body */
    --gradient-start: rgba(102, 126, 234, 0.05);
    --gradient-end: rgba(118, 75, 162, 0.05);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-solid: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Accent colors */
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Status colors */
    --success-bg: rgba(76, 175, 80, 0.1);
    --success-color: #2e7d32;
    --success-border: rgba(76, 175, 80, 0.2);

    --warning-bg: rgba(255, 152, 0, 0.1);
    --warning-color: #e65100;
    --warning-border: rgba(255, 152, 0, 0.2);

    --error-bg: rgba(211, 47, 47, 0.1);
    --error-color: #c62828;
    --error-border: rgba(211, 47, 47, 0.2);

    /* Input/Form colors */
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: rgba(0, 0, 0, 0.08);
    --input-focus-border: #667eea;
    --input-focus-shadow: rgba(102, 126, 234, 0.1);

    /* Paywall overlay */
    --paywall-gradient: linear-gradient(to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 10%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.85) 60%,
        rgba(255, 255, 255, 0.98) 90%);

    /* Post content colors */
    --content-text: #424242;
    --content-link: #667eea;

    /* Button secondary */
    --btn-secondary-bg: #f1f3f5;
    --btn-secondary-text: #495057;
    --btn-secondary-hover: #e9ecef;

    /* Accent backgrounds */
    --accent-bg: rgba(102, 126, 234, 0.08);
    --accent-border: rgba(102, 126, 234, 0.15);

    /* Spinner */
    --spinner-bg: rgba(102, 126, 234, 0.2);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: rgba(30, 30, 30, 0.8);

    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-tertiary: #909090;
    --text-muted: #888888;
    --text-light: #666666;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.2);

    /* Gradient overlay for body - more visible in dark mode */
    --gradient-start: rgba(102, 126, 234, 0.08);
    --gradient-end: rgba(118, 75, 162, 0.08);

    /* Glassmorphism - adjusted for dark mode */
    --glass-bg: rgba(30, 30, 30, 0.8);
    --glass-bg-solid: rgba(40, 40, 40, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Accent colors - slightly lighter for contrast */
    --accent-primary: #8b9eff;
    --accent-secondary: #9b7dd4;
    --accent-gradient: linear-gradient(135deg, #8b9eff 0%, #9b7dd4 100%);

    /* Status colors - adjusted for dark mode */
    --success-bg: rgba(76, 175, 80, 0.15);
    --success-color: #81c784;
    --success-border: rgba(76, 175, 80, 0.3);

    --warning-bg: rgba(255, 152, 0, 0.15);
    --warning-color: #ffb74d;
    --warning-border: rgba(255, 152, 0, 0.3);

    --error-bg: rgba(211, 47, 47, 0.15);
    --error-color: #ef5350;
    --error-border: rgba(211, 47, 47, 0.3);

    /* Input/Form colors */
    --input-bg: rgba(40, 40, 40, 0.8);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-border: #8b9eff;
    --input-focus-shadow: rgba(139, 158, 255, 0.15);

    /* Paywall overlay - dark mode */
    --paywall-gradient: linear-gradient(to bottom,
        transparent 0%,
        rgba(18, 18, 18, 0.3) 10%,
        rgba(18, 18, 18, 0.6) 30%,
        rgba(18, 18, 18, 0.85) 60%,
        rgba(18, 18, 18, 0.98) 90%);

    /* Post content colors */
    --content-text: #d0d0d0;
    --content-link: #8b9eff;

    /* Button secondary */
    --btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --btn-secondary-text: #b0b0b0;
    --btn-secondary-hover: rgba(255, 255, 255, 0.15);

    /* Accent backgrounds */
    --accent-bg: rgba(139, 158, 255, 0.12);
    --accent-border: rgba(139, 158, 255, 0.2);

    /* Spinner */
    --spinner-bg: rgba(139, 158, 255, 0.2);
}

/* Smooth theme transitions */
body,
.nav,
.post-card,
.content-card,
.contact-card,
.footer,
.form-group input,
.form-group textarea,
.filter-btn,
.paywall-content,
.alert {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme toggle button styles */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    background: var(--glass-bg-solid);
}

.theme-toggle:focus {
    outline: none;
}
