/* =========================================
   1. GLOBAL & RESET
   ========================================= */
html {
    height: 100%;
    overflow: hidden; /* Previene scroll en el contenedor raíz */
    overscroll-behavior: none; /* Evita rebote en Mac/Android */
}

body {
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes orangePulse {
        0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
        70% { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0); }
        100% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
    }
    .live-glow {
        animation: orangePulse 2s infinite;
        background-color: #fff7ed !important; /* bg-orange-50 forzado */
        border-color: #fdba74 !important; /* border-orange-300 */
        color: #f97316 !important; /* text-orange-500 */
    }
	
	/* Animación para que los modales suban desde abajo */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animación para cerrar hacia abajo */
@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.animate-slide-down {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Contenedor principal scrollable */
#mainScroll {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* =========================================
   2. INPUTS (FECHA Y HORA)
   Limpieza de estilos nativos del navegador
   ========================================= */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Ocultar icono de calendario nativo */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
    background: none !important;
    color: transparent !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    position: absolute;
    right: 0;
    bottom: 0;
}

/* Ocultar spinners (flechas subir/bajar) en inputs de hora */
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

/* Ocultar botón 'borrar' de Edge/IE */
input[type="date"]::-ms-clear,
input[type="time"]::-ms-clear {
    display: none !important;
}

/* =========================================
   3. ANIMACIONES Y TRANSICIONES
   ========================================= */
.animate-global-fade {
    animation: globalFadeIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes globalFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#splashScreen.opacity-0 {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   4. ESTRUCTURA SPA (Single Page App)
   ========================================= */
.page {
    display: none;
    width: 100%;
    height: 100%;
}

.page.active {
    display: block;
}

/* =========================================
   5. CALENDARIO & EVENTOS
   ========================================= */
#calendarContainer {
    position: relative;
    overflow: hidden;
}

/* Patrón visual para días cerrados/festivos */
.closed-day-pattern {
    background-color: #f8fafc; /* slate-50 */
    background-image: repeating-linear-gradient(
        45deg,
        rgba(203, 213, 225, 0.15) 0px,
        rgba(203, 213, 225, 0.15) 1px,
        transparent 1px,
        transparent 12px
    );
}

/* Líneas de tiempo (Pasado y Ahora) */
#pastOverlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.04);
    pointer-events: none;
    z-index: 5;
    transform-origin: top;
    transform: scaleY(0);
}

#nowLine {
    pointer-events: none;
    z-index: 30;
    top: 0;
    transform: translateY(0);
}

#nowLine::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 9px;
    height: 9px;
    background: #ef4444;
    border-radius: 50%;
}

/* Bloqueo de interacción en eventos arrastrables (usado por JS) */
[id^="evt-front-"] {
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

.time-slot {
    position: relative;
}

/* =========================================
   6. UTILIDADES
   ========================================= */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}