/* modes.css - Sistema de 3 modos para bkscorporation */

/* ===== VARIABLES CSS PARA LOS 3 MODOS ===== */

/* Modo Día (Por defecto) */
:root {
    /* Paleta de colores */
    --color-bg-primary: #FAF9F6;          /* Fondo principal */
    --color-text-primary: #1A1A1A;        /* Texto principal */
    --color-accent: #0B5345;              /* Color de acento (verde élite) */
    --color-border: #E0E0E0;              /* Bordes y líneas */
    --color-card-bg: #FFFFFF;             /* Fondo de tarjetas */
    
    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    /* Efectos */
    --svg-filter: none;                   /* Filtro para iconos SVG */
    --shadow-color: rgba(0, 0, 0, 0.08);  /* Color de sombras */
}

/* Modo Tarde (Crepúsculo) */
[data-theme="evening"] {
    --color-bg-primary: #E6E6FA;          /* Lavanda suave */
    --color-text-primary: #2C2C2C;        /* Gris oscuro cálido */
    --color-accent: #CC5500;              /* Terracota/naranja quemado */
    --color-border: #C9AFFF;              /* Borde lavanda oscuro */
    --color-card-bg: #F0E6FF;             /* Fondo lavanda muy claro */
    --svg-filter: invert(40%) sepia(60%) saturate(400%) hue-rotate(330deg);
    --shadow-color: rgba(204, 85, 0, 0.1);
}

/* Modo Noche (Oscuro) */
[data-theme="night"] {
    --color-bg-primary: #0A0A0A;          /* Negro azabache */
    --color-text-primary: #F0F0F0;        /* Blanco plateado */
    --color-accent: #D4AF37;              /* Oro metálico */
    --color-border: #2A2A2A;              /* Gris muy oscuro */
    --color-card-bg: #1A1A1A;             /* Gris antracita */
    --svg-filter: invert(90%) sepia(40%) saturate(500%) hue-rotate(330deg);
    --shadow-color: rgba(212, 175, 55, 0.15);
}

/* ===== SELECTOR CIRCULAR DE MODOS ===== */
.theme-switcher-wrapper {
    display: inline-flex;
    gap: 8px;
    padding: 10px;
    background: var(--color-card-bg);
    border-radius: 50px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-switch-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-switch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.theme-switch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-color);
}

.theme-switch-btn:hover::before {
    opacity: 0.15;
}

.theme-switch-btn[aria-pressed="true"] {
    background: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-card-bg), 0 0 0 4px var(--color-accent);
}

.theme-switch-btn[aria-pressed="true"]::before {
    opacity: 0;
}

.theme-switch-btn[aria-pressed="true"] .theme-icon {
    fill: var(--color-card-bg);
    filter: none;
}

.theme-icon {
    fill: var(--color-text-primary);
    transition: all 0.3s ease;
    filter: var(--svg-filter);
    position: relative;
    z-index: 1;
}

.theme-switch-btn:hover .theme-icon {
    fill: var(--color-accent);
}

/* ===== TRANSICIONES SUAVES PARA EL CAMBIO DE MODO ===== */
* {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Excepciones para elementos que no deben transicionar */
img,
video,
iframe,
.theme-switch-btn,
.theme-switch-btn * {
    transition: none !important;
}

/* ===== ESTILOS PARA ESTADO ACTIVO/FOCUS ===== */
.theme-switch-btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.theme-switch-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===== RESPONSIVE PARA EL SELECTOR ===== */
@media (max-width: 768px) {
    .theme-switcher-wrapper {
        padding: 8px;
        gap: 6px;
    }
    
    .theme-switch-btn {
        width: 40px;
        height: 40px;
    }
}

/* ===== UTILIDADES PARA LOS MODOS ===== */
.mode-day-hidden {
    display: none !important;
}

[data-theme="day"] .mode-day-hidden {
    display: revert !important;
}

.mode-evening-hidden {
    display: none !important;
}

[data-theme="evening"] .mode-evening-hidden {
    display: revert !important;
}

.mode-night-hidden {
    display: none !important;
}

[data-theme="night"] .mode-night-hidden {
    display: revert !important;
}