/*
 * Temas de temporada. Se activan con la clase body.theme-<slug> (ver App\Support\SeasonalTheme).
 * Cada tema redefine las variables de theme.css y, si quiere, agrega un detalle decorativo.
 *   --app-sidebar : fondo del menú lateral mientras el tema está activo
 */

/* Pieza decorativa de la barra superior (emoji + saludo). */
.theme-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .85rem;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}

.theme-badge .theme-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

body.has-theme .main-sidebar {
    background: var(--app-sidebar) !important;
}

body.has-theme .main-header.navbar {
    border-bottom: 3px solid var(--app-accent);
}

/* Franja decorativa fina bajo la barra superior. */
body.has-theme .main-header.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background: var(--app-stripe, transparent);
    pointer-events: none;
}

/* ---- Año Nuevo ---- */
body.theme-ano-nuevo {
    --app-accent: #b8860b;
    --app-accent-soft: rgba(184, 134, 11, .12);
    --app-sidebar: #111827;
    --app-stripe: linear-gradient(90deg, #f59e0b, #fde68a, #f59e0b);
}

/* ---- Día del Cariño ---- */
body.theme-dia-del-carino {
    --app-accent: #db2777;
    --app-accent-soft: rgba(219, 39, 119, .10);
    --app-sidebar: #9d174d;
    --app-stripe: linear-gradient(90deg, #f472b6, #fbcfe8, #f472b6);
}

/* ---- Semana Santa (morado) ---- */
body.theme-semana-santa {
    --app-accent: #6d28d9;
    --app-accent-soft: rgba(109, 40, 217, .10);
    --app-sidebar: #4c1d95;
    --app-stripe: linear-gradient(90deg, #6d28d9, #a78bfa, #6d28d9);
}

/* ---- Día de la Madre ---- */
body.theme-dia-de-la-madre {
    --app-accent: #e11d74;
    --app-accent-soft: rgba(225, 29, 116, .10);
    --app-sidebar: #be185d;
    --app-stripe: linear-gradient(90deg, #fb7185, #fde68a, #fb7185);
}

/* ---- Día del Padre ---- */
body.theme-dia-del-padre {
    --app-accent: #0f766e;
    --app-accent-soft: rgba(15, 118, 110, .10);
    --app-sidebar: #134e4a;
    --app-stripe: linear-gradient(90deg, #0f766e, #5eead4, #0f766e);
}

/* ---- Independencia (azul y blanco de Guatemala) ---- */
body.theme-independencia {
    --app-accent: #4997d0;
    --app-accent-soft: rgba(73, 151, 208, .12);
    --app-sidebar: #1d5f94;
    --app-stripe: linear-gradient(90deg, #4997d0 0 33%, #ffffff 33% 66%, #4997d0 66% 100%);
}

/* Bandera de Guatemala dibujada con CSS (franjas azul-blanco-azul). */
body.theme-independencia .theme-emoji {
    display: inline-block;
    width: 1.5em;
    height: 1em;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, .25);
    background: linear-gradient(90deg, #4997d0 0 33.3%, #ffffff 33.3% 66.6%, #4997d0 66.6% 100%);
}

body.theme-independencia .main-header.navbar::after {
    box-shadow: 0 0 0 1px rgba(73, 151, 208, .35);
}

/* ---- Halloween ---- */
body.theme-halloween {
    --app-accent: #f97316;
    --app-accent-soft: rgba(249, 115, 22, .12);
    --app-sidebar: #1c1326;
    --app-stripe: repeating-linear-gradient(90deg, #f97316 0 28px, #1c1326 28px 56px);
}

/* Telaraña en la esquina del menú lateral. */
body.theme-halloween .main-sidebar::before {
    content: "🕸️";
    position: absolute;
    top: 52px;
    right: 6px;
    font-size: 2.2rem;
    opacity: .35;
    pointer-events: none;
}

body.theme-halloween .theme-badge {
    background: #1c1326;
    color: #fb923c;
}

/* ---- Día de los Santos (barriletes de Sumpango) ---- */
body.theme-dia-de-los-santos {
    --app-accent: #ea580c;
    --app-accent-soft: rgba(234, 88, 12, .11);
    --app-sidebar: #7c2d12;
    --app-stripe: linear-gradient(90deg, #ea580c, #facc15, #16a34a, #db2777, #2563eb, #ea580c);
}

/* ---- Navidad ---- */
body.theme-navidad {
    --app-accent: #c62828;
    --app-accent-soft: rgba(198, 40, 40, .10);
    --app-sidebar: #14532d;
    --app-stripe: repeating-linear-gradient(90deg, #c62828 0 24px, #ffffff 24px 32px, #15803d 32px 56px, #ffffff 56px 64px);
}

/* Nieve ligera en el menú lateral. */
body.theme-navidad .main-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 90px 80px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 150px 20px, #fff, transparent),
        radial-gradient(2px 2px at 60px 140px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 190px 110px, #fff, transparent);
    background-size: 220px 180px;
    animation: theme-snow 14s linear infinite;
}

@keyframes theme-snow {
    to {
        background-position: 0 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-navidad .main-sidebar::before {
        animation: none;
    }
}

/* ---------- Pantalla de inicio de sesión ---------- */
body.guest {
    font-family: var(--app-font);
    background: var(--app-bg);
    min-height: 100vh;
}

body.guest.has-theme {
    background: linear-gradient(160deg, var(--app-sidebar) 0%, color-mix(in srgb, var(--app-sidebar) 60%, #000) 100%) fixed;
}

body.guest.has-theme::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--app-stripe, transparent);
    z-index: 10;
}

body.guest .card {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

body.guest .btn-info {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: var(--app-accent-contrast);
}

body.guest.has-theme .theme-badge {
    background: rgba(255, 255, 255, .92);
}

.theme-badge-lg {
    font-size: 1.15rem;
    padding: .4rem 1.2rem;
}

body.guest.theme-navidad::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .55;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 90px 80px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 150px 20px, #fff, transparent),
        radial-gradient(2px 2px at 60px 140px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 190px 110px, #fff, transparent);
    background-size: 220px 180px;
    animation: theme-snow 14s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    body.guest.theme-navidad::after {
        animation: none;
    }
}

body.guest.has-theme footer {
    background: rgba(0, 0, 0, .35) !important;
    color: #fff !important;
}
