/**
 * Boost Theme Framework - Block Theme Tokens
 *
 * Centralized CSS variables for all block themes.
 * Eliminates $theme_styles arrays from render.php files.
 *
 * Usage: Add data-variation="dark" to block, then use var(--boost-bg)
 *
 * @package BoostThemeFramework\Tokens
 */

/* /assets/css/tokens/block-themes.css */

/* =============================================================================
   LIGHT THEME
   ============================================================================= */

[data-variation="light"] {
    /* Base */
    --boost-bg: #ffffff;
    --boost-text: #0f172a;
    --boost-muted: #64748b;
    --boost-border: #e2e8f0;
    
    /* Buttons */
    --boost-btn-primary-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-btn-primary-text: #ffffff;
    --boost-btn-secondary-bg: transparent;
    --boost-btn-secondary-border: #7C3AED;
    --boost-btn-secondary-text: #7C3AED;
    
    /* Cards */
    --boost-card-bg: #ffffff;
    --boost-card-border: #e2e8f0;
    --boost-card-shadow: 0 1px 3px rgba(0,0,0,0.1);
    
    /* Box (CTA boxed style) */
    --boost-box-bg: #f8fafc;
    --boost-box-border: #e2e8f0;
    
    /* Icons */
    --boost-icon-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-icon-color: #ffffff;
    --boost-icon-outlined-bg: transparent;
    --boost-icon-outlined-border: #7C3AED;
    --boost-icon-outlined-color: #7C3AED;
    
    /* Badge */
    --boost-badge-bg: rgba(124, 58, 237, 0.1);
    --boost-badge-text: #7C3AED;
    
    /* Values (stats) */
    --boost-value-color: #7C3AED;
    
    /* Dividers */
    --boost-divider: #e2e8f0;
    
    /* Overlay */
    --boost-overlay: rgba(0, 0, 0, 0.5);
}

/* =============================================================================
   DARK THEME
   ============================================================================= */

[data-variation="dark"] {
    /* Base */
    --boost-bg: linear-gradient(135deg, #0F0F0F 0%, #1a1a2e 50%, #16213e 100%);
    --boost-text: #ffffff;
    --boost-muted: #94a3b8;
    --boost-border: rgba(255, 255, 255, 0.15);
    
    /* Buttons */
    --boost-btn-primary-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-btn-primary-text: #ffffff;
    --boost-btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --boost-btn-secondary-border: rgba(255, 255, 255, 0.3);
    --boost-btn-secondary-text: #ffffff;
    
    /* Cards */
    --boost-card-bg: rgba(255, 255, 255, 0.05);
    --boost-card-border: rgba(255, 255, 255, 0.1);
    --boost-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    /* Box */
    --boost-box-bg: rgba(255, 255, 255, 0.05);
    --boost-box-border: rgba(255, 255, 255, 0.1);
    
    /* Icons */
    --boost-icon-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-icon-color: #ffffff;
    --boost-icon-outlined-bg: transparent;
    --boost-icon-outlined-border: rgba(255, 255, 255, 0.3);
    --boost-icon-outlined-color: #ffffff;
    
    /* Badge */
    --boost-badge-bg: rgba(124, 58, 237, 0.2);
    --boost-badge-text: #a78bfa;
    
    /* Values */
    --boost-value-color: #ffffff;
    
    /* Dividers */
    --boost-divider: rgba(255, 255, 255, 0.1);
    
    /* Overlay */
    --boost-overlay: rgba(0, 0, 0, 0.6);
}

/* =============================================================================
   GRADIENT THEME
   ============================================================================= */

[data-variation="gradient"] {
    /* Base */
    --boost-bg: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
    --boost-text: #ffffff;
    --boost-muted: rgba(255, 255, 255, 0.8);
    --boost-border: rgba(255, 255, 255, 0.25);
    
    /* Buttons - inverted for contrast */
    --boost-btn-primary-bg: #ffffff;
    --boost-btn-primary-text: #7C3AED;
    --boost-btn-secondary-bg: rgba(255, 255, 255, 0.15);
    --boost-btn-secondary-border: rgba(255, 255, 255, 0.4);
    --boost-btn-secondary-text: #ffffff;
    
    /* Cards */
    --boost-card-bg: rgba(255, 255, 255, 0.1);
    --boost-card-border: rgba(255, 255, 255, 0.2);
    --boost-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    
    /* Box */
    --boost-box-bg: rgba(255, 255, 255, 0.1);
    --boost-box-border: rgba(255, 255, 255, 0.2);
    
    /* Icons - inverted */
    --boost-icon-bg: #ffffff;
    --boost-icon-color: #7C3AED;
    --boost-icon-outlined-bg: transparent;
    --boost-icon-outlined-border: rgba(255, 255, 255, 0.4);
    --boost-icon-outlined-color: #ffffff;
    
    /* Badge */
    --boost-badge-bg: rgba(255, 255, 255, 0.2);
    --boost-badge-text: #ffffff;
    
    /* Values */
    --boost-value-color: #ffffff;
    
    /* Dividers */
    --boost-divider: rgba(255, 255, 255, 0.2);
    
    /* Overlay */
    --boost-overlay: rgba(0, 0, 0, 0.4);
}

/* =============================================================================
   MUTED THEME
   ============================================================================= */

[data-variation="muted"] {
    /* Base */
    --boost-bg: #f8fafc;
    --boost-text: #0f172a;
    --boost-muted: #64748b;
    --boost-border: #e2e8f0;
    
    /* Buttons */
    --boost-btn-primary-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-btn-primary-text: #ffffff;
    --boost-btn-secondary-bg: transparent;
    --boost-btn-secondary-border: #7C3AED;
    --boost-btn-secondary-text: #7C3AED;
    
    /* Cards */
    --boost-card-bg: #ffffff;
    --boost-card-border: #e2e8f0;
    --boost-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    
    /* Box */
    --boost-box-bg: #ffffff;
    --boost-box-border: #e2e8f0;
    
    /* Icons */
    --boost-icon-bg: linear-gradient(135deg, #7C3AED, #EC4899);
    --boost-icon-color: #ffffff;
    --boost-icon-outlined-bg: transparent;
    --boost-icon-outlined-border: #7C3AED;
    --boost-icon-outlined-color: #7C3AED;
    
    /* Badge */
    --boost-badge-bg: rgba(124, 58, 237, 0.1);
    --boost-badge-text: #7C3AED;
    
    /* Values */
    --boost-value-color: #7C3AED;
    
    /* Dividers */
    --boost-divider: #e2e8f0;
    
    /* Overlay */
    --boost-overlay: rgba(0, 0, 0, 0.5);
}

/* =============================================================================
   GLASS THEME
   ============================================================================= */

[data-variation="glass"] {
    /* Base */
    --boost-bg: rgba(0, 0, 0, 0.3);
    --boost-text: #ffffff;
    --boost-muted: rgba(255, 255, 255, 0.7);
    --boost-border: rgba(255, 255, 255, 0.2);
    
    /* Glass effect */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Text shadow for visibility */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    
    /* Buttons */
    --boost-btn-primary-bg: rgba(255, 255, 255, 0.9);
    --boost-btn-primary-text: #0f172a;
    --boost-btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --boost-btn-secondary-border: rgba(255, 255, 255, 0.3);
    --boost-btn-secondary-text: #ffffff;
    
    /* Cards */
    --boost-card-bg: rgba(255, 255, 255, 0.08);
    --boost-card-border: rgba(255, 255, 255, 0.15);
    --boost-card-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    
    /* Box */
    --boost-box-bg: rgba(255, 255, 255, 0.08);
    --boost-box-border: rgba(255, 255, 255, 0.15);
    
    /* Icons */
    --boost-icon-bg: rgba(255, 255, 255, 0.15);
    --boost-icon-color: #ffffff;
    --boost-icon-outlined-bg: transparent;
    --boost-icon-outlined-border: rgba(255, 255, 255, 0.3);
    --boost-icon-outlined-color: #ffffff;
    
    /* Badge */
    --boost-badge-bg: rgba(255, 255, 255, 0.15);
    --boost-badge-text: #ffffff;
    
    /* Values */
    --boost-value-color: #ffffff;
    
    /* Dividers */
    --boost-divider: rgba(255, 255, 255, 0.15);
    
    /* Overlay */
    --boost-overlay: rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   COMPONENT CLASSES (optional utility classes)
   ============================================================================= */

/* Badge component */
.boost-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--boost-badge-bg);
    color: var(--boost-badge-text);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 50px;
}

/* Card component */
.boost-card {
    background: var(--boost-card-bg);
    border: 1px solid var(--boost-card-border);
    border-radius: 16px;
    box-shadow: var(--boost-card-shadow);
}

/* Button primary */
.boost-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--boost-btn-primary-bg);
    color: var(--boost-btn-primary-text);
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boost-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

/* Button secondary */
.boost-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--boost-btn-secondary-bg);
    color: var(--boost-btn-secondary-text);
    border: 2px solid var(--boost-btn-secondary-border);
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.boost-btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--boost-btn-secondary-border);
}

/* ============================================================================
   GLOBAL SVG ICON CONSTRAINTS
   Forces all inline SVG icons to respect size limits
   ============================================================================ */

/* Default inline SVG icons - prevent oversizing */
svg:not([class]):not([width]) {
    max-width: 100%;
    height: auto;
}

/* Tab button icons - small inline, NO background */
.tab-btn-icon,
.tabs-nav .tab-btn svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.tab-btn-icon svg {
    width: 18px !important;
    height: 18px !important;
    background: none !important;
}

/* Feature icons in cards - medium */
.feature-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 28px !important;
    height: 28px !important;
}

/* Navigation/button icons - small */
.slider-nav svg,
.nav-btn svg,
.alert-dismiss svg,
.announcement-dismiss svg {
    width: 20px !important;
    height: 20px !important;
}

/* Icon container */
.boost-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--boost-icon-bg);
    color: var(--boost-icon-color);
    border-radius: 12px;
}

.boost-icon svg {
    width: 24px !important;
    height: 24px !important;
}

/* =============================================================================
   STYLED ICON (from icon-style CPT component)
   Uses CSS variables set by boost_render_styled_icon():
   --icon-container-size, --icon-size, --icon-radius, --icon-border-width
   Colors from Color Scheme: --boost-icon-bg, --boost-icon-color
   ============================================================================= */

.boost-styled-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--icon-container-size, 48px);
    height: var(--icon-container-size, 48px);
    border-radius: var(--icon-radius, 12px);
    background: var(--boost-icon-bg, #f1f5f9);
    color: var(--boost-icon-color, #3b82f6);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: visible;
}

.boost-styled-icon svg {
    width: var(--icon-size, 24px) !important;
    height: var(--icon-size, 24px) !important;
}

.boost-styled-icon i {
    font-size: var(--icon-size, 24px);
    width: var(--icon-size, 24px);
    height: var(--icon-size, 24px);
    line-height: 1;
}

/* Filled variant (default) */
.boost-styled-icon--filled {
    background: var(--boost-icon-bg, #f1f5f9);
    color: var(--boost-icon-color, #3b82f6);
}

/* Circle variant */
.boost-styled-icon--circle {
    background: var(--boost-icon-bg, #f1f5f9);
    color: var(--boost-icon-color, #3b82f6);
    border-radius: 50% !important;
}

/* Outlined variant */
.boost-styled-icon--outlined {
    background: transparent;
    color: var(--boost-icon-color, #3b82f6);
    border: var(--icon-border-width, 2px) solid var(--boost-icon-bg, #e2e8f0);
}

/* Minimal variant (no container) */
.boost-styled-icon--minimal {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--boost-icon-color, #3b82f6);
}

/* Inline icon (no background) */
.boost-icon--inline {
    width: auto;
    height: auto;
    background: transparent;
    color: var(--boost-icon-color, currentColor);
    border-radius: 0;
}

.boost-icon--inline svg {
    width: 1em !important;
    height: 1em !important;
}

/* Small icon with background */
.boost-icon--sm {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
}

.boost-icon--sm svg {
    width: 18px !important;
    height: 18px !important;
}

/* Large icon with background */
.boost-icon--lg {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 16px;
}

.boost-icon--lg svg {
    width: 32px !important;
    height: 32px !important;
}

.boost-icon--outlined {
    background: var(--boost-icon-outlined-bg, transparent);
    border: 2px solid var(--boost-icon-outlined-border, var(--boost-border));
    color: var(--boost-icon-outlined-color, var(--boost-icon-color));
}