/**
 * Theme Name:  POPiNTV
 * Theme URI:   https://popintv.se
 * Description: Swedish School TV Network – Multisite theme for local and hub sites.
 * Version:     3.3.0
 * Author:      POPiNTV
 * Author URI:  https://popintv.se
 * Text Domain: popintv
 * Domain Path: /languages
 * License:     GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Tags:        education, video, multisite, responsive
 * Requires at least: 6.4
 * Requires PHP: 8.1
 */

/* Base CSS Custom Properties — Modern Dark Theme (default) */
:root {
    /* Core palette */
    --popintv-primary: #E63946;
    --popintv-primary-hover: #FF4D4D;
    --popintv-primary-dark: #C1121F;
    --popintv-primary-glow: rgba(230, 57, 70, 0.4);
    --popintv-accent: #3B82F6;
    --popintv-accent-hover: #60A5FA;
    --popintv-live: #FF0000;

    /* Surfaces */
    --popintv-background: #0F0F0F;
    --popintv-surface: #1A1A1A;
    --popintv-surface-hover: #252525;
    --popintv-surface-elevated: #222222;
    --popintv-border: #333333;
    --popintv-border-subtle: rgba(255, 255, 255, 0.08);

    /* Text */
    --popintv-text: #F5F5F5;
    --popintv-text-secondary: #A0A0A0;
    --popintv-text-muted: #6B6B6B;
    --popintv-text-light: #FFFFFF;

    /* Grayscale (kept for compatibility) */
    --popintv-white: #FFFFFF;
    --popintv-black: #000000;
    --popintv-gray-100: #1E1E1E;
    --popintv-gray-200: #2A2A2A;
    --popintv-gray-300: #3A3A3A;
    --popintv-gray-400: #5A5A5A;
    --popintv-gray-500: #8A8A8A;
    --popintv-gray-600: #A0A0A0;
    --popintv-gray-700: #C0C0C0;
    --popintv-gray-800: #E0E0E0;
    --popintv-gray-900: #F5F5F5;

    /* Typography — Inter for everything (modern, clean, readable) */
    --popintv-font-heading: 'Inter', sans-serif;
    --popintv-font-body: 'Inter', sans-serif;

    /* Shape & depth */
    --popintv-radius-sm: 4px;
    --popintv-radius-md: 8px;
    --popintv-radius-lg: 16px;

    --popintv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --popintv-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --popintv-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --popintv-shadow-glow: 0 0 20px var(--popintv-primary-glow);

    --popintv-transition: 0.2s ease;
    --popintv-max-width: 1400px;

    /* Menu (legacy names kept for CSSGenerator compatibility) */
    --popintv-menu-bg: #0F0F0F;
    --popintv-menu-text: #F5F5F5;
    --popintv-menu-hover: #E63946;
}

/* Light Mode (optional, user preference) */
[data-theme="light"] {
    --popintv-background: #FFFFFF;
    --popintv-surface: #F5F5F5;
    --popintv-surface-hover: #EBEBEB;
    --popintv-surface-elevated: #FFFFFF;
    --popintv-border: #E0E0E0;
    --popintv-border-subtle: rgba(0, 0, 0, 0.08);
    --popintv-text: #1A1A1A;
    --popintv-text-secondary: #666666;
    --popintv-text-muted: #999999;
    --popintv-white: #FFFFFF;
    --popintv-gray-100: #F5F5F5;
    --popintv-gray-200: #EBEBEB;
    --popintv-gray-300: #E0E0E0;
    --popintv-gray-400: #CCCCCC;
    --popintv-gray-500: #999999;
    --popintv-gray-600: #666666;
    --popintv-gray-700: #4A4A4A;
    --popintv-gray-800: #2A2A2A;
    --popintv-gray-900: #1A1A1A;
    --popintv-menu-bg: #0F0F0F;
    --popintv-menu-text: #F5F5F5;
    --popintv-menu-hover: #E63946;

    --popintv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --popintv-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --popintv-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Respect OS light preference only if user explicitly chose light */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        /* Keep dark as default — this block intentionally left minimal.
           Users who prefer light can toggle via the dark-mode button. */
    }
}

/* Minimal reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--popintv-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--popintv-text);
    background-color: var(--popintv-background);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--popintv-accent);
    text-decoration: none;
    transition: color var(--popintv-transition);
}

a:hover {
    color: var(--popintv-primary);
}

/* Screen reader only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
