/* =====================================================================
   CALENDARIO.CSS - ESTILOS DEL CALENDARIO MENSUAL
   CON DÍA HOY ESPECIAL (fondo blanco, borde dorado, texto "Hoy")
   ===================================================================== */

/* =====================================================================
   CONTENEDOR PRINCIPAL
   ===================================================================== */

.calendario-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

/* =====================================================================
   HEADER DEL CALENDARIO
   ===================================================================== */

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.calendario-header h3 {
    color: #2c3e50;
    font-size: 2em;
    margin: 0;
}

.btn-nav-mes {
    background: linear-gradient(135deg, #2a337c 0%, #3d4a9f 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(42, 51, 124, 0.3);
}

.btn-nav-mes:hover {
    background: linear-gradient(135deg, #1f2559 0%, #2a337c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 51, 124, 0.4);
}

/* =====================================================================
   GRID DEL CALENDARIO
   ===================================================================== */

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* Headers de días de la semana */
.calendario-dia-header {
    background: #2a337c;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95em;
    border-radius: 8px 8px 0 0;
}

/* Celda vacía (antes del primer día del mes) */
.calendario-dia-vacio {
    background: transparent;
    min-height: 100px;
}

/* =====================================================================
   CELDA DE DÍA - BASE
   ===================================================================== */

.calendario-dia {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

/* Número del día */
.dia-numero {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

/* Información del día (cupos, etc.) */
.dia-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.85em;
    text-align: center;
}

/* =====================================================================
   ESTADOS DEL DÍA - COLORES UNIFORMES
   ===================================================================== */

/* DÍA CON CUPOS DISPONIBLES - VERDE CLARO */
.calendario-dia.dia-con-cupos {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    cursor: pointer;
}

.calendario-dia.dia-con-cupos:hover {
    background: linear-gradient(135deg, #c3e6cb 0%, #b1dfbb 100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.calendario-dia.dia-con-cupos .dia-numero {
    color: #155724;
    font-weight: 700;
}

.cupos-disponibles {
    color: #155724;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-direction: column;
}

/* DÍA SIN CUPOS (NO CONFIGURADOS) - GRIS CLARO */
.calendario-dia.dia-sin-cupos {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    cursor: not-allowed;
}

.calendario-dia.dia-sin-cupos .dia-numero {
    color: #6c757d;
    font-weight: 600;
}

/* DÍA SIN CUPOS (TODOS OCUPADOS) - ROJO CLARO */
.calendario-dia.dia-sin-cupos-ocupados {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    cursor: not-allowed;
}

.calendario-dia.dia-sin-cupos-ocupados .dia-numero {
    color: #721c24;
    font-weight: 700;
}

.sin-cupos {
    color: #721c24;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-direction: column;
}

/* DÍA PASADO (NO SELECCIONABLE) - GRIS OSCURO */
.calendario-dia.dia-pasado {
    background: #e9ecef;
    border: 2px solid #ced4da;
    opacity: 0.5;
    cursor: not-allowed;
}

.calendario-dia.dia-pasado .dia-numero {
    color: #6c757d;
    text-decoration: line-through;
}

/* =====================================================================
   DÍA ACTUAL (HOY) - DISEÑO ESPECIAL
   Fondo blanco, borde dorado, muestra "Hoy" sin info de cupos
   ===================================================================== */

.calendario-dia.dia-hoy {
    background: white;
    border: 3px solid #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    cursor: not-allowed;
    animation: pulseHoy 2s ease-in-out infinite;
}

@keyframes pulseHoy {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.6);
    }
}

.calendario-dia.dia-hoy .dia-numero {
    color: #f39c12;
    font-weight: 800;
    font-size: 1.6em;
}

/* Texto "Hoy" especial */
.dia-hoy-texto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f39c12;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dia-hoy-texto strong {
    margin-top: 5px;
}

/* =====================================================================
   LEYENDA DEL CALENDARIO
   ===================================================================== */

.calendario-leyenda {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    color: #2c3e50;
    font-weight: 500;
}

.leyenda-cuadro {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.leyenda-cuadro.dia-con-cupos {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.leyenda-cuadro.dia-sin-cupos {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.leyenda-cuadro.dia-pasado {
    background: #e9ecef;
    border: 2px solid #ced4da;
    opacity: 0.5;
}

/* =====================================================================
   RESPONSIVE - CALENDARIO
   ===================================================================== */

@media (max-width: 768px) {
    .calendario-container {
        padding: 20px;
    }

    .calendario-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .calendario-header h3 {
        font-size: 1.5em;
    }

    .btn-nav-mes {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .calendario-grid {
        gap: 8px;
    }

    .calendario-dia {
        min-height: 80px;
        padding: 8px;
    }

    .calendario-dia-header {
        padding: 8px;
        font-size: 0.8em;
    }

    .dia-numero {
        font-size: 1.2em;
    }

    .calendario-dia.dia-hoy .dia-numero {
        font-size: 1.4em;
    }

    .dia-info {
        font-size: 0.75em;
    }

    .dia-hoy-texto {
        font-size: 0.9em;
    }

    .calendario-leyenda {
        gap: 15px;
        padding-top: 15px;
    }

    .leyenda-item {
        font-size: 0.85em;
    }

    .leyenda-cuadro {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .calendario-dia {
        min-height: 70px;
        padding: 6px;
    }

    .dia-numero {
        font-size: 1em;
        margin-bottom: 4px;
    }

    .calendario-dia.dia-hoy .dia-numero {
        font-size: 1.2em;
    }

    .dia-info {
        font-size: 0.7em;
    }

    .dia-hoy-texto {
        font-size: 0.8em;
    }

    .calendario-leyenda {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}