﻿.horario-docente {
    --guinda: #790b26;
    --guinda-oscuro: #59081e;
    --azul: #173a68;
    --borde: #e6e1dc;
    color: var(--azul);
    padding: 18px 0 28px;
}

/* Encabezado */

.horario-encabezado {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #f0dfcf;
    border-radius: 12px;
    background: linear-gradient( 110deg, #fffaf5, #f9eee1 );
}

.horario-encabezado-icono {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient( 145deg, #9a3029, #690c20 );
    color: #fff;
    font-size: 25px;
}

.horario-encabezado-texto h2 {
    margin: 0 0 5px;
    color: var(--guinda-oscuro);
    font-size: 23px;
    font-weight: 800;
}

.horario-encabezado-texto p {
    margin: 0;
    color: #70839a;
    font-size: 14px;
}

/* Información del docente */

.horario-informacion {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 17px;
    margin-bottom: 18px;
    border: 1px solid #dfe7ef;
    border-radius: 10px;
    background: #f5f8fc;
}

.horario-dato {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

    .horario-dato > i {
        color: var(--guinda);
        font-size: 19px;
    }

    .horario-dato div {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .horario-dato span {
        color: #788da3;
        font-size: 12px;
    }

    .horario-dato strong {
        color: #24476f;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

/* Controles */

.horario-controles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.horario-vista-activa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--guinda);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.horario-navegacion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.horario-btn-icono,
.horario-btn-hoy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #dfe6ee;
    border-radius: 7px;
    background: #fff;
    color: var(--azul);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.horario-btn-hoy {
    padding: 8px 12px;
}

    .horario-btn-icono:hover,
    .horario-btn-hoy:hover {
        background: #f8eef1;
        color: var(--guinda);
    }

.horario-semana {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #dfe6ee;
    border-radius: 7px;
    background: #fff;
    color: #24476f;
    font-size: 13px;
    font-weight: 700;
}

/* Mensajes */

.horario-error,
.horario-aviso-semana {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    font-size: 13px;
}

.horario-error {
    border: 1px solid #efcbd0;
    background: #fff0f1;
    color: #a12131;
}

.horario-aviso-semana {
    border: 1px solid #e6e1dc;
    background: #fafbfc;
    color: #6d8196;
}

.horario-vacio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 130px;
    padding: 20px;
    color: #78899d;
}

/* Tabla semanal */

.horario-tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
}

.horario-tabla {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

    .horario-tabla th {
        padding: 12px 8px;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        background: var(--guinda-oscuro);
        color: #fff;
        text-align: center;
        font-size: 13px;
        font-weight: 700;
    }

        .horario-tabla th span,
        .horario-tabla th small {
            display: block;
        }

        .horario-tabla th small {
            margin-top: 4px;
            opacity: 0.85;
            font-size: 12px;
        }

        .horario-tabla th.horario-dia-hoy {
            background: #a11637;
        }

    .horario-tabla td {
        height: auto;
        padding: 4px;
        border-right: 1px solid #e8edf2;
        background: #f7f9fc;
        vertical-align: top;
    }

        .horario-tabla td:last-child,
        .horario-tabla th:last-child {
            border-right: 0;
        }

        .horario-tabla td.horario-celda-hoy {
            background: #fffaf5;
        }

.horario-sin-sesion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 100px;
    color: #9baabd;
    text-align: center;
}

    .horario-sin-sesion span {
        font-size: 18px;
    }

    .horario-sin-sesion small {
        font-size: 11px;
    }

/* Tarjetas de sesiones */

.horario-sesion {
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #b9dff7;
    border-radius: 8px;
    background: #e5f4ff;
    color: #214b78;
}

    .horario-sesion:last-child {
        margin-bottom: 0;
    }

.horario-sesion-feriado {
    border-color: #f0d9b7;
    background: #fff6e8;
}

.horario-sesion-superior {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

    .horario-sesion-superior strong {
        font-size: 12px;
    }

.horario-condicion {
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

    .horario-condicion.laborable {
        background: #dff5e7;
        color: #16864e;
    }

    .horario-condicion.feriado {
        background: #ffecd2;
        color: #ac6b00;
    }

    .horario-condicion.desconocido {
        background: #eef1f4;
        color: #718092;
    }

.horario-sesion-nombre {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.horario-sesion-hora,
.horario-sesion-actividad {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
}

.horario-sesion-actividad {
    color: #607b98;
}

    .horario-sesion-actividad span {
        overflow-wrap: anywhere;
    }

/* Nota inferior */

.horario-nota {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px;
    margin-top: 15px;
    border: 1px solid #e3eaf1;
    border-radius: 8px;
    background: #f7f9fc;
    color: #748aa0;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .horario-informacion {
        grid-template-columns: 1fr;
    }

    .horario-controles {
        align-items: flex-start;
        flex-direction: column;
    }

    .horario-encabezado-texto h2 {
        font-size: 20px;
    }
}


/* =========================================================
   HORARIO SEMANAL POR BLOQUES
   ========================================================= */

.horario-tabla-por-horas {
    width: 100%;
    min-width: 1100px;
    table-layout: fixed;
    border-collapse: collapse;
}

    /* Columna de horas */

    .horario-tabla-por-horas .horario-columna-hora {
        width: 115px;
        min-width: 115px;
        background: #59081e;
        color: #fff;
        text-align: center;
    }

    .horario-tabla-por-horas .horario-celda-hora {
        width: 115px;
        padding: 10px 6px;
        border-right: 1px solid #e1e8ef;
        border-bottom: 1px solid #e1e8ef;
        background: #f3f6fa;
        color: #607c9f;
        text-align: center;
        vertical-align: middle;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

    /* Celdas de los días */

    .horario-tabla-por-horas .horario-celda-bloque {
        height: auto;
        min-height: 82px;
        padding: 5px;
        border-right: 1px solid #e4eaf0;
        border-bottom: 1px solid #e4eaf0;
        background: #f7f9fc;
        vertical-align: top;
    }

        .horario-tabla-por-horas .horario-celda-bloque.horario-celda-hoy {
            background: #fffaf4;
        }

    .horario-tabla-por-horas .horario-celda-vacia {
        display: block;
        padding: 20px 0;
        color: #adbbca;
        text-align: center;
        font-size: 13px;
    }

    /* Tarjetas dentro de cada bloque */

    .horario-tabla-por-horas .horario-sesion {
        min-height: 68px;
        margin: 0 0 5px;
        padding: 8px;
        box-sizing: border-box;
    }

        .horario-tabla-por-horas .horario-sesion:last-child {
            margin-bottom: 0;
        }

    .horario-tabla-por-horas .horario-sesion-nombre {
        font-size: 11px;
        line-height: 1.3;
    }

    .horario-tabla-por-horas .horario-sesion-hora {
        margin-top: 6px;
        font-size: 10px;
    }

    /* Evita que una condición larga ensanche la columna */
    .horario-tabla-por-horas .horario-condicion {
        font-size: 9px;
    }

/* =========================================================
   CUADRÍCULA COMPACTA
   ========================================================= */

/*
 * Anula la altura de 220 px de la tabla anterior.
 * Se aplica también a la columna de horas.
 */

/* Celdas de cada bloque */
.horario-docente .horario-tabla-por-horas .horario-celda-bloque {
    padding: 4px;
    vertical-align: top;
}

/* Celdas sin sesiones */
.horario-docente .horario-tabla-por-horas .horario-celda-vacia {
    padding: 16px 0;
}

/* Tarjetas más compactas */
.horario-docente .horario-tabla-por-horas .horario-sesion {
    min-height: 64px;
    padding: 7px 8px;
    margin-bottom: 4px;
}

/* Columna de horas */
.horario-docente .horario-tabla-por-horas .horario-celda-hora {
    padding: 8px 6px;
    vertical-align: middle;
}

/* =========================================================
   RECREO
   ========================================================= */

.horario-docente .horario-tabla-por-horas .horario-celda-recreo {
    padding: 5px;
    border-bottom: 1px solid #e4eaf0;
    background: #f7f9fc;
}

.horario-recreo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
    padding: 7px 12px;
    border: 1px solid #e3d9f3;
    border-radius: 8px;
    background: #f2eefb;
    color: #75469e;
}

    .horario-recreo > i {
        font-size: 21px;
    }

    .horario-recreo div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .horario-recreo strong {
        font-size: 12px;
    }

    .horario-recreo span {
        color: #8879a0;
        font-size: 11px;
    }

/* Se usa si una clase se cruza con el recreo */
.horario-etiqueta-recreo {
    display: block;
    margin-bottom: 4px;
    color: #75469e;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
}

/* Filas del horario compactas */
.horario-tabla-por-horas tbody tr {
    height: auto;
}

.horario-tabla-por-horas .horario-celda-bloque,
.horario-tabla-por-horas .horario-celda-hora,
.horario-tabla-por-horas .horario-celda-recreo {
    height: auto;
    padding: 4px;
}

/* Guion de las celdas sin sesión */
.horario-tabla-por-horas .horario-celda-vacia {
    display: block;
    padding: 8px 0;
    text-align: center;
}

/* Tarjetas de las sesiones */
.horario-tabla-por-horas .horario-sesion {
    min-height: 0;
    margin-bottom: 4px;
    padding: 7px 8px;
}

/* Fila del recreo */
.horario-tabla-por-horas .horario-recreo {
    min-height: 0;
    padding: 8px;
}

.horario-selector-curso {
    margin-bottom: 18px;
}

