/**
 * DQA Schedule Mini
 * Horario semanal compacto para sidebar (versión mini)
 */

/* ========================================= */
/* Contenedor Principal */
/* ========================================= */
.dqa-schedule-mini-container {
    width: 100%;
    margin: 0 auto;
    font-family: var(--fuentePrincipalDash, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif);
}

/* ========================================= */
/* Encabezado del Mes */
/* ========================================= */
.dqa-schedule-month-header {
    text-align: left;
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

/* ========================================= */
/* Tabla del Calendario Mini */
/* ========================================= */
.dqa-schedule-mini-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid #d1d5db;
}

/* ========================================= */
/* Encabezados de Días (Compactos) */
/* ========================================= */
.dqa-schedule-mini-table thead th {
    background-color: #fff;
    color: #000;
    padding: 0.8rem 0.4rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    border: none;
    border-top: none !important;
    border-bottom: 1px solid #d1d5db;
    vertical-align: middle;
}

/* Celda "Time" */
.dqa-schedule-mini-table thead th.dqa-time-header {
    width: 80px;
    min-width: 80px;
    font-size: 1.6rem;
    font-weight: 500;
}

/* Letra del día (S, M, T...) */
.dqa-day-letter {
    display: block;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
    line-height: 1;
}

/* Número del día (17, 18...) */
.dqa-day-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1;
}

/* ========================================= */
/* Celdas de Tiempo (Compactas) */
/* ========================================= */
.dqa-schedule-mini-table tbody tr {
    /* Sin estilos especiales, los bordes se manejan en las celdas */
}

/* Columna de horas (formato: 06 AM, 12 PM, etc.) */
.dqa-time-cell-mini {
    background-color: #f9fafb;
    color: #000;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 400;
    padding: 0.8rem 0.4rem;
    border: 1px solid #d1d5db;
    vertical-align: middle;
    width: 80px;
    min-width: 80px;
    height: 30px;
    white-space: nowrap;
}

/* Celdas de eventos (mini grid) */
.dqa-event-cell-mini {
    padding: 0;
    /*border: 1px solid #d1d5db;*/
    border: none;
    vertical-align: middle;
    position: relative;
    height: 30px;
    background-color: #fff;
    transition: background-color 0.15s ease;
    cursor: pointer;
    width: auto; /* Se expande proporcionalmente */
}

.dqa-event-cell-mini:hover {
    background-color: var(--colorLavandaClaro2, rgba(198,193,223,0.1));
}

/* ========================================= */
/* Bloques de Eventos (sin texto) */
/* ========================================= */
.dqa-schedule-event-mini {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, var(--colorLavandaClaro, rgba(198,193,223,0.3)) 0%, var(--colorLavanda, rgba(198,193,223,1)) 100%);
    border-left: 3px solid var(--colorMoradoOscuro, rgba(168,162,208,1));
    border-radius: 3px;
    transition: all 0.2s ease;
}

.dqa-schedule-event-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px var(--colorMoradoOscuro2, rgba(168,162,208,0.5));
    z-index: 10;
}

/* Personal Event Styling */
.dqa-schedule-event-mini.personal-event {
    background: linear-gradient(135deg, var(--colorVerde3, rgba(211,216,152,0.2)) 0%, var(--colorVerde2, rgba(211,216,152,0.3)) 100%);
    border-left: 3px solid var(--colorVerde, rgba(211,216,152,1));
}

.dqa-schedule-event-mini.personal-event:hover {
    box-shadow: 0 2px 6px var(--colorVerde4, rgba(211,216,152,0.5));
}

/* ========================================= */
/* Tooltip (Información al Hover) */
/* ========================================= */
.dqa-schedule-tooltip {
    position: absolute;
    background-color: var(--colorMoradoOscuro, rgba(168,162,208,1));
    color: #fff;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    line-height: 1.5;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px var(--colorMoradoOscuro2, rgba(168,162,208,0.5));
    min-width: 180px;
    max-width: 250px;
}

.dqa-schedule-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Flecha del tooltip */
.dqa-schedule-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--colorMoradoOscuro, rgba(168,162,208,1));
}

/* Cuando el tooltip está arriba de la celda */
.dqa-schedule-tooltip.position-top::before {
    bottom: auto;
    top: -6px;
    border-top: none;
    border-bottom: 6px solid var(--colorMoradoOscuro, rgba(168,162,208,1));
}

/* Título del evento en tooltip */
.dqa-tooltip-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #fff;
}

/* Hora en tooltip */
.dqa-tooltip-time {
    font-size: 1.2rem;
    color: #fff;
    display: block;
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

/* Profesor en tooltip */
.dqa-tooltip-teacher {
    font-size: 1.2rem;
    color: #fff;
    display: block;
    opacity: 0.9;
}

/* ========================================= */
/* Día Actual (Destacado) */
/* ========================================= */
.dqa-schedule-mini-table thead th.dqa-today {
    background-color: var(--colorLavandaClaro2, rgba(198,193,223,0.1));
    font-weight: 700;
}

.dqa-schedule-mini-table thead th.dqa-today .dqa-day-number {
    color: var(--colorMoradoOscuro, rgba(168,162,208,1));
    font-weight: 700;
}

.dqa-event-cell-mini.dqa-today-col {
    background-color: var(--colorLavandaClaro2, rgba(198,193,223,0.1));
}

.dqa-event-cell-mini.dqa-today-col:hover {
    background-color: var(--colorLavandaClaro, rgba(198,193,223,0.3));
}

/* ========================================= */
/* Loading State */
/* ========================================= */
.dqa-schedule-mini-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.dqa-schedule-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    font-size: 1.2rem;
}

/* ========================================= */
/* Responsive */
/* ========================================= */
@media screen and (max-width: 480px) {
    .dqa-schedule-mini-container {
        max-width: 100%;
    }

    .dqa-schedule-month-header {
        font-size: 1.6rem;
    }

    .dqa-day-letter {
        font-size: 1rem;
    }

    .dqa-day-number {
        font-size: 1.1rem;
    }

    .dqa-time-cell-mini {
        font-size: 0.9rem;
        width: 60px;
        padding: 0.6rem 0.2rem;
    }

    .dqa-event-cell-mini {
        height: 35px;
    }
}
