/**
 * Multi-Theme System - Base Variables & Structure
 *
 * This file defines the base CSS variable system that all themes will use.
 * Each theme overrides these variables to create unique visual experiences.
 *
 * @package YAWC
 * @version 1.0.0
 */

/* ============================================
   BASE THEME VARIABLES (Tech - Default)
   ============================================ */
:root {
    /* Brand Colors */
    --theme-primary: #667eea;
    --theme-primary-dark: #5568d3;
    --theme-primary-light: #7c8ef0;
    --theme-secondary: #764ba2;
    --theme-accent: #4f46e5;

    /* Backgrounds */
    --theme-bg-primary: #ffffff;
    --theme-bg-secondary: #f8f9fa;
    --theme-bg-tertiary: #e9ecef;
    --theme-bg-overlay: rgba(0, 0, 0, 0.5);

    /* Text Colors */
    --theme-text-primary: #1a1a1a;
    --theme-text-secondary: #666666;
    --theme-text-tertiary: #999999;
    --theme-text-inverse: #ffffff;

    /* Border Colors */
    --theme-border-primary: rgba(0, 0, 0, 0.1);
    --theme-border-secondary: rgba(0, 0, 0, 0.05);
    --theme-border-accent: var(--theme-primary);

    /* Typography */
    --theme-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --theme-font-serif: Georgia, 'Times New Roman', serif;
    --theme-font-mono: 'Fira Code', 'Source Code Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
    --theme-font-display: var(--theme-font-sans);

    /* Font Weights */
    --theme-font-weight-normal: 400;
    --theme-font-weight-medium: 500;
    --theme-font-weight-semibold: 600;
    --theme-font-weight-bold: 700;

    /* Font Sizes */
    --theme-font-size-xs: 0.75rem;
    --theme-font-size-sm: 0.875rem;
    --theme-font-size-base: 1rem;
    --theme-font-size-lg: 1.125rem;
    --theme-font-size-xl: 1.25rem;
    --theme-font-size-2xl: 1.5rem;
    --theme-font-size-3xl: 1.875rem;
    --theme-font-size-4xl: 2.25rem;

    /* Spacing */
    --theme-spacing-xs: 0.25rem;
    --theme-spacing-sm: 0.5rem;
    --theme-spacing-md: 1rem;
    --theme-spacing-lg: 1.5rem;
    --theme-spacing-xl: 2rem;
    --theme-spacing-2xl: 3rem;
    --theme-spacing-3xl: 4rem;

    /* Border Radius */
    --theme-radius-none: 0;
    --theme-radius-sm: 4px;
    --theme-radius-md: 8px;
    --theme-radius-lg: 12px;
    --theme-radius-xl: 16px;
    --theme-radius-full: 9999px;

    /* Shadows */
    --theme-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --theme-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --theme-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --theme-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --theme-shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.18);
    --theme-shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.22);

    /* Special Effects */
    --theme-glow: none;
    --theme-glow-hover: none;
    --theme-gradient-primary: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    --theme-gradient-secondary: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-primary) 100%);

    /* Transitions */
    --theme-transition-fast: 0.15s ease;
    --theme-transition-base: 0.3s ease;
    --theme-transition-slow: 0.5s ease;

    /* Z-index layers */
    --theme-z-base: 1;
    --theme-z-dropdown: 1000;
    --theme-z-sticky: 1020;
    --theme-z-fixed: 1030;
    --theme-z-modal-backdrop: 1040;
    --theme-z-modal: 1050;
    --theme-z-popover: 1060;
    --theme-z-tooltip: 1070;
}

/* ============================================
   THEME APPLICATION
   ============================================ */
body {
    background-color: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    font-family: var(--theme-font-sans);
    font-weight: var(--theme-font-weight-normal);
    transition: background-color var(--theme-transition-base),
                color var(--theme-transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--theme-font-display);
    color: var(--theme-text-primary);
    font-weight: var(--theme-font-weight-bold);
}

h1 { font-size: var(--theme-font-size-4xl); }
h2 { font-size: var(--theme-font-size-3xl); }
h3 { font-size: var(--theme-font-size-2xl); }
h4 { font-size: var(--theme-font-size-xl); }
h5 { font-size: var(--theme-font-size-lg); }
h6 { font-size: var(--theme-font-size-base); }

/* Links */
a {
    color: var(--theme-primary);
    transition: color var(--theme-transition-fast);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--theme-primary-dark);
}

/* Buttons */
.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.yawc-button {
    background: var(--theme-gradient-primary);
    color: var(--theme-text-inverse);
    border: none;
    border-radius: var(--theme-radius-md);
    padding: var(--theme-spacing-md) var(--theme-spacing-xl);
    font-weight: var(--theme-font-weight-semibold);
    font-size: var(--theme-font-size-base);
    cursor: pointer;
    transition: all var(--theme-transition-base);
    box-shadow: var(--theme-shadow-sm);
    text-shadow: var(--theme-glow);
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.yawc-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-lg);
    text-shadow: var(--theme-glow-hover);
}

/* Cards */
.yawc-card,
.article-wrapper,
.widget {
    background-color: var(--theme-bg-secondary);
    border-radius: var(--theme-radius-lg);
    padding: var(--theme-spacing-lg);
    box-shadow: var(--theme-shadow-sm);
    border: 1px solid var(--theme-border-secondary);
    transition: all var(--theme-transition-base);
}

.yawc-card:hover,
.article-wrapper:hover {
    box-shadow: var(--theme-shadow-md);
    transform: translateY(-2px);
}

/* Code blocks */
code {
    font-family: var(--theme-font-mono);
    background-color: var(--theme-bg-tertiary);
    color: var(--theme-primary-dark);
    padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
    border-radius: var(--theme-radius-sm);
    font-size: var(--theme-font-size-sm);
}

pre {
    background-color: var(--theme-bg-tertiary);
    border-radius: var(--theme-radius-md);
    padding: var(--theme-spacing-lg);
    overflow-x: auto;
    box-shadow: var(--theme-shadow-sm);
}

pre code {
    background-color: transparent;
    color: var(--theme-text-primary);
    padding: 0;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--theme-border-accent);
    padding-left: var(--theme-spacing-lg);
    margin-left: 0;
    font-style: italic;
    color: var(--theme-text-secondary);
    background-color: var(--theme-bg-secondary);
    padding: var(--theme-spacing-lg);
    border-radius: var(--theme-radius-sm);
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

th {
    background: var(--theme-gradient-primary);
    color: var(--theme-text-inverse);
    padding: var(--theme-spacing-md);
    text-align: left;
    font-weight: var(--theme-font-weight-semibold);
}

td {
    padding: var(--theme-spacing-md);
    border-bottom: 1px solid var(--theme-border-primary);
}

tr:hover {
    background-color: var(--theme-bg-secondary);
}

/* Header */
.site-header {
    background-color: var(--theme-bg-primary);
    border-bottom: 1px solid var(--theme-border-primary);
    box-shadow: var(--theme-shadow-sm);
}

.main-title a {
    color: var(--theme-primary);
    font-weight: var(--theme-font-weight-bold);
    text-shadow: var(--theme-glow);
}

/* Navigation */
.main-navigation a {
    color: var(--theme-text-primary);
    transition: color var(--theme-transition-fast);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--theme-primary);
}

/* Footer */
.site-footer {
    background-color: var(--theme-bg-tertiary);
    border-top: 1px solid var(--theme-border-primary);
}

/* Badges */
.yawc-badge,
.cat-links a,
.tags-links a {
    display: inline-block;
    padding: var(--theme-spacing-xs) var(--theme-spacing-md);
    border-radius: var(--theme-radius-full);
    font-size: var(--theme-font-size-sm);
    font-weight: var(--theme-font-weight-medium);
    transition: all var(--theme-transition-fast);
}

.cat-links a {
    background: var(--theme-gradient-primary);
    color: var(--theme-text-inverse);
    text-shadow: var(--theme-glow);
}

.tags-links a {
    background-color: var(--theme-bg-tertiary);
    color: var(--theme-text-secondary);
}

.tags-links a:hover {
    background-color: var(--theme-primary);
    color: var(--theme-text-inverse);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    background-color: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-primary);
    border-radius: var(--theme-radius-sm);
    padding: var(--theme-spacing-sm) var(--theme-spacing-md);
    color: var(--theme-text-primary);
    font-family: var(--theme-font-sans);
    transition: all var(--theme-transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
    border-color: var(--theme-primary);
}

/* Accessibility */
.screen-reader-text:focus {
    background-color: var(--theme-primary);
    color: var(--theme-text-inverse);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Theme transition class */
.theme-transitioning * {
    transition: background-color var(--theme-transition-slow),
                color var(--theme-transition-slow),
                border-color var(--theme-transition-slow) !important;
}
