﻿.horario-general {
    --guinda: #790b26;
    --guinda-oscuro: #59081e;
    --azul: #173a68;
    --borde: #e8e0d9;
    padding: 18px 0 28px;
    color: var(--azul);
}

/* Encabezado */

.horario-general-encabezado {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #f0ddc8;
    border-radius: 12px;
    background: linear-gradient( 110deg, #fffaf5, #f8eadb );
}

.horario-general-icono {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient( 145deg, #f2a31e, #d47900 );
    color: #fff;
    font-size: 25px;
}

.horario-general-encabezado h2 {
    margin: 0 0 5px;
    color: var(--guinda-oscuro);
    font-size: 23px;
    font-weight: 800;
}

.horario-general-encabezado p {
    margin: 0;
    color: #6f839a;
    font-size: 14px;
}

/* Información */

.horario-general-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid #dfe7ef;
    border-radius: 10px;
    background: #f5f8fc;
}

.horario-general-dato {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

    .horario-general-dato > i {
        color: var(--guinda);
        font-size: 19px;
    }

    .horario-general-dato div {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .horario-general-dato span {
        color: #7a8ea4;
        font-size: 12px;
    }

    .horario-general-dato strong {
        color: #24476f;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

/* Controles */

.horario-general-controles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.horario-general-vista {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--guinda);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.horario-general-navegacion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.horario-general-btn-icono,
.horario-general-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-weight: 700;
    cursor: pointer;
}

.horario-general-btn-hoy {
    padding: 8px 12px;
}

    .horario-general-btn-icono:hover,
    .horario-general-btn-hoy:hover {
        background: #faedf0;
        color: var(--guinda);
    }

.horario-general-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-general-estado,
.horario-general-error,
.horario-general-aviso,
.horario-general-advertencia {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 14px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 13px;
}

.horario-general-estado {
    justify-content: center;
    min-height: 120px;
    color: #72869a;
}

.horario-general-error {
    border: 1px solid #f0c6cc;
    background: #fff0f1;
    color: #a12131;
}

.horario-general-aviso {
    border: 1px solid #dfe6ee;
    background: #f7f9fc;
    color: #71869b;
}

.horario-general-advertencia {
    border: 1px solid #f0d8ab;
    background: #fff6e8;
    color: #94600d;
}

/* Tabla */

.horario-general-tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dfe6ee;
    border-radius: 10px;
    background: #fff;
}

.horario-general-tabla {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    table-layout: fixed;
}

    .horario-general-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;
    }

        .horario-general-tabla th span,
        .horario-general-tabla th small {
            display: block;
        }

        .horario-general-tabla th small {
            margin-top: 4px;
            opacity: 0.88;
            font-size: 11px;
        }

        .horario-general-tabla th.dia-actual {
            background: #a11637;
        }

.horario-general-columna-hora {
    width: 115px;
}

.horario-general-tabla td {
    height: auto;
    border-right: 1px solid #e4eaf0;
    border-bottom: 1px solid #e4eaf0;
    vertical-align: top;
}

    .horario-general-tabla th:last-child,
    .horario-general-tabla td:last-child {
        border-right: 0;
    }

.horario-general-hora {
    padding: 10px 6px;
    background: #f3f6fa;
    color: #607c9f;
    text-align: center;
    vertical-align: middle !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.horario-general-celda {
    padding: 4px;
    background: #f8fafc;
}

    .horario-general-celda.celda-actual {
        background: #fffaf4;
    }

.horario-general-guion {
    display: block;
    padding: 14px 0;
    color: #aab8c7;
    text-align: center;
    font-size: 12px;
}

/* Sesiones */

.horario-general-sesion {
    padding: 8px;
    margin-bottom: 5px;
    border: 1px solid;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 11px;
    line-height: 1.4;
}

    .horario-general-sesion:last-child {
        margin-bottom: 0;
    }

    .horario-general-sesion strong {
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
    }

.horario-general-unidad {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.horario-general-hora-sesion {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 10px;
}

.color-0 {
    border-color: #b9dff7;
    background: #e5f4ff;
    color: #214b78;
}

.color-1 {
    border-color: #e7c8d4;
    background: #fcebf0;
    color: #7b1735;
}

.color-2 {
    border-color: #cfe8c7;
    background: #eef9e9;
    color: #376d3c;
}

.color-3 {
    border-color: #e4d4f3;
    background: #f5edff;
    color: #65468a;
}

.color-feriado {
    border-color: #f0d9b7;
    background: #fff6e8;
    color: #9b650e;
}

.horario-general-feriado {
    display: inline-block;
    padding: 3px 6px;
    margin-top: 6px;
    border-radius: 10px;
    background: #ffe9c6;
    color: #a15f00;
    font-size: 10px;
    font-weight: 700;
}

/* Recreo */

.horario-general-celda-recreo {
    padding: 5px;
    background: #f8fafc;
}

.horario-general-recreo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 9px;
    border: 1px solid #e3d9f3;
    border-radius: 8px;
    background: #f2eefb;
    color: #75469e;
}

    .horario-general-recreo > i {
        font-size: 20px;
    }

    .horario-general-recreo div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .horario-general-recreo strong {
        font-size: 12px;
    }

    .horario-general-recreo span {
        color: #8879a0;
        font-size: 11px;
    }

.horario-general-etiqueta-recreo {
    display: block;
    margin-bottom: 4px;
    color: #75469e;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
}

/* Resumen */

.horario-general-resumen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 17px;
}

.horario-general-resumen-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #eee3dc;
    border-radius: 10px;
    background: #fff;
}

.resumen-icono {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 18px;
}

    .resumen-icono.unidades {
        background: #fae9ed;
        color: #790b26;
    }

    .resumen-icono.semana {
        background: #fff0d8;
        color: #d27b00;
    }

    .resumen-icono.laborables {
        background: #e2f6e9;
        color: #16864e;
    }

.horario-general-resumen-card div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .horario-general-resumen-card div span {
        color: #7b8b9d;
        font-size: 12px;
    }

.horario-general-resumen-card strong {
    color: #263b5d;
    font-size: 22px;
}

.horario-general-nota {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 13px;
    margin-top: 15px;
    border: 1px solid #e3eaf1;
    border-radius: 8px;
    background: #f7f9fc;
    color: #73889d;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .horario-general-info,
    .horario-general-resumen {
        grid-template-columns: 1fr;
    }

    .horario-general-controles {
        align-items: flex-start;
        flex-direction: column;
    }

    .horario-general-encabezado h2 {
        font-size: 19px;
    }
}


/* Botón PDF */

.horario-general-encabezado {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.horario-btn-pdf {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 17px;
    border: 0;
    border-radius: 8px;
    background: #760b26;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

    .horario-btn-pdf:hover {
        background: #58071b;
    }

    .horario-btn-pdf:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* Selector semanal / mensual */

.horario-selector-vista {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.horario-vista-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #dce4ed;
    border-radius: 7px;
    background: #f4f7fb;
    color: #183764;
    font-weight: 600;
    cursor: pointer;
}

    .horario-vista-btn.activa {
        border-color: #760b26;
        background: #760b26;
        color: #fff;
    }

.horario-periodo-impresion {
    display: none;
}

/* Calendario mensual */

.horario-mensual-contenedor {
    overflow-x: auto;
    margin-top: 15px;
    border: 1px solid #dce4ed;
    border-radius: 9px;
}

.horario-mensual-tabla {
    width: 100%;
    min-width: 850px;
    table-layout: fixed;
    border-collapse: collapse;
}

    .horario-mensual-tabla th {
        padding: 13px 8px;
        background: #670820;
        color: #fff;
        text-align: center;
        font-weight: 700;
        border-right: 1px solid rgba(255, 255, 255, .15);
    }

    .horario-mensual-tabla td {
        height: 125px;
        padding: 7px;
        vertical-align: top;
        border: 1px solid #e2e8f0;
        background: #fff;
    }

        .horario-mensual-tabla td.otro-mes {
            background: #f3f5f8;
            color: #a5b0bd;
        }

.mes-numero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin-bottom: 6px;
    color: #173765;
    font-weight: 700;
}

.mes-hoy {
    border-radius: 50%;
    background: #8e1230;
    color: #fff;
}

.mes-dia .horario-general-sesion {
    margin-bottom: 6px;
    padding: 7px;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.mes-dia .horario-general-unidad {
    margin-top: 3px;
}

.mes-dia .horario-general-hora-sesion {
    margin-top: 4px;
}

@media (max-width: 768px) {
    .horario-btn-pdf {
        margin-left: 0;
    }
}