/* ====== Tarjeta de mes ====== */
.calendar-card{ min-width:0; }
.calendar-header{ font-weight:700; letter-spacing:.02em; }

/* ====== Tabla del mes ====== */
.calendar-table{ width:100%; table-layout:fixed; font-size:.95rem; }
.calendar-table th, .calendar-table td{ text-align:center; padding:.15rem .2rem; }

/* Altura fija + caja uniforme (semanas idénticas) */
.calendar-table td.day{
    height: 2.6rem;
    vertical-align: top;
    position: relative;
    border: 1px solid transparent;       /* no cambia el layout al resaltar */
    border-radius: .35rem;
    padding: .15rem .2rem;
    box-sizing: border-box;
}
.master-61ah .calendar-table td.day{
    height: 3.6rem;
}
.calendar-table .muted{ color:#6c757d; }

/* Número + marca */
.day-inner{ display:flex; flex-direction:column; align-items:center; gap:.1rem; }
.day-num{ margin-top:.10rem; line-height:1; font-weight:600; }
.mark-badge{ font-size:.65rem; font-weight:600; opacity:.85; margin-left:.25rem; }

/* ====== Píldora de asignatura ====== */
/*
.asig-pill{
    display:inline-block;
    padding:0 .35rem;
    font-size:.68rem;
    line-height:1.15;
    font-weight:600;
    border-radius:.25rem;
    border:1px solid rgba(74,144,226,.35);
    background:rgba(74,144,226,.12);
    color:#0b3d91;
    white-space:nowrap;
}
.asig-pill--day{
    position:absolute; left:50%; bottom:3px; transform:translateX(-50%);
    pointer-events:none; !* no interfiere con hover del día *!
}
.asig-pill--inline{
    position:static; transform:none;
}

*/

    /* Contenedor de pills al fondo del día */
.asig-pills{
    position:absolute;
    left:2px; right:2px; bottom:3px;
    display:flex; justify-content:center; gap:2px; flex-wrap:wrap;
    pointer-events:none; /* no molesta el hover del td */
}

/* Pill base (ya la usas) */
.asig-pill{
    display:inline-block;
    padding:0 .35rem;
    font-size:.68rem; line-height:1.15; font-weight:600;
    border-radius:.25rem;
    border:1px solid rgba(74,144,226,.35);
    background:rgba(74,144,226,.12);
    color:#0b3d91;
    white-space:nowrap;
}

/* Variante del día: no cambia */
.asig-pill--day{ position:static; transform:none; }

/* “+N” compacta */
.asig-pill--more{
    border-style:dashed;
    opacity:.85;
}
/* Docencia: fondo + contorno sin variar grosor del borde base */
.day-asig{
    background:#e6f0ff;
    box-shadow: inset 0 0 0 1px #b5d1ff;
}
.asig-outline{ box-shadow: inset 0 0 0 2px #4a90e2; }

/* Eventos (mandan color cuando son “duros”) */
.day-holiday{ background: var(--bs-danger); color:#fff !important; }
.day-tribunal{ background:#f3dcde !important; }
.day-strike{ background:#D3D3D3 !important; }
.day-upmweek{ background:#b1a2c2 !important; }
.day-english{ background:#fcbd92 !important; }
.day-closure{ background:#6331a2 !important; color:#fff; }
.day-exam{ background:#fff4b8 !important; }
.event-outline{ outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px; }

/* Periodos */
.day-period-enrollment{ background:#e9ecef; }
.day-period-teaching{   background:#dbe9ff; }
.day-period-exams1{     background:#e7f7d7; }
.day-period-exams2{     background:#fff4b8; }
.day-period-any{        background:#e9ecef; }

/* Hoy */
.day-today{ outline:2px solid #0d6efd; outline-offset:-2px; }

/* Mejor contraste de píldora sobre festivo */
.day-holiday .asig-pill--day{
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.5);
    color:#fff;
}

/* ====== Leyenda ====== */
.legend-card .card-body{ padding:0; }
.legend-title{ padding: 0 .2rem 0 0; font-size:.92rem; }
.legend-date{ width:7.5rem; text-align:right; white-space:nowrap; }

/* Píldora de fecha en la leyenda (evita estilos del td) */
.legend-pill{
    display:inline-block;
    padding:.25rem .6rem;
    border-radius:.5rem;
    font-weight:700;
    font-size:.92rem;
    line-height:1;
}

/* Reutiliza colores */
.legend-pill.day-holiday{ background:var(--bs-danger); color:#fff; }
.legend-pill.day-start{ outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px; }
.legend-pill.day-tribunal{ background:#f3dcde; }
.legend-pill.day-strike{ background:#D3D3D3; }
.legend-pill.day-upmweek{ background:#b1a2c2; }
.legend-pill.day-english{ background:#fcbd92; }
.legend-pill.day-exam{ background:#fff4b8; }
.legend-pill.day-closure{ background:#6331a2; color:#fff; }

/* Badge legend (periodos estáticos) */
.badge-legend{ width:1.1rem; height:1.1rem; display:inline-block; border-radius:.2rem;
    margin-right:.5rem; vertical-align:middle; outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px; }

/* Sticky leyenda en xl */
.sticky-xl-top{ position:sticky; top:1rem; }

/* Ajustes varios */
.list-group-item ul li{ margin:.1rem 0; }


/* Píldora común */
.legend-chip{
    display:inline-flex; align-items:center;
    padding:.20rem .55rem;
    border-radius:.5rem;
    font-weight:700; font-size:.92rem; line-height:1;
    white-space:nowrap;
    border:1px solid rgba(0,0,0,.08);
    background:var(--bs-light);
    color:var(--bs-body-color);
}

/* ===== Eventos (type-*) ===== */
.legend-chip.type-holiday  { background:var(--bs-danger); color:#fff; border-color:transparent; }
.legend-chip.type-start    { background:transparent; border:1.5px solid rgba(0,0,0,.25); color:inherit; }
.legend-chip.type-tribunal { background:#f3dcde; border-color:transparent; }
.legend-chip.type-strike { background:#D3D3D3; border-color:transparent; }
.legend-chip.type-exam { background:#fff4b8; border-color:transparent; }
.legend-chip.type-upmweek  { background:#b1a2c2; border-color:transparent; }
.legend-chip.type-english  { background:#fcbd92; border-color:transparent; }
.legend-chip.type-closure  { background:#6331a2; color:#fff; border-color:transparent; }

/* ===== Periodos (type-*) ===== */
.legend-chip.type-enrollment { background:#e9ecef; border-color:transparent; }
.legend-chip.type-teaching   { background:#dbe9ff; border-color:transparent; }
.legend-chip.type-exams1     { background:#e7f7d7; border-color:transparent; }
.legend-chip.type-exams2     { background:#fff4b8; border-color:transparent; }

/* (opcional) fallback genérico por si aparece un tipo nuevo */
.legend-chip[class*="type-"]:not(.type-holiday):not(.type-start):not(.type-tribunal):not(.type-strike):not(.type-exam):not(.type-upmweek):not(.type-english):not(.type-closure):not(.type-enrollment):not(.type-teaching):not(.type-exams1):not(.type-exams2){
    background:#eef1f4;
}
.legend-divider{
    margin:.6rem 0;
    height:2px;
    border:0;
    background: #444444;
    opacity:1;
}