/* Calendario mensual público */
.cal { background: #fff; border-radius: 1.25rem; box-shadow: var(--shadow); padding: 20px; }
.cal__toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cal__month { flex: 1; min-width: 160px; margin: 0; font-size: clamp(20px, 4vw, 26px); font-weight: 800; text-transform: capitalize; color: var(--navy); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 18px; color: var(--navy); transition: background .15s;
}
.icon-btn:hover { background: var(--bg); }

.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.cal__weekday { background: var(--bg); text-align: center; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 0; }
.cal__weekday--weekend { background: #e4e7ee; }
.cal__day { background: #fff; min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* Sábados y domingos en gris */
.cal__day--weekend { background: #eef0f4; }
.cal__day--out { background: #fafbfd; }
.cal__day--out.cal__day--weekend { background: #f1f2f5; }
.cal__day--out .cal__num { opacity: .35; }
.cal__num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal__day--today .cal__num { background: var(--coral); color: #fff; }

.cal__chip {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; border-radius: 6px; padding: 3px 6px;
  font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform .12s ease, background .12s ease;
}
.cal__chip { background: var(--cat, var(--blue)); }
.cal__chip:hover, .cal__chip:focus-visible { filter: brightness(1.15); transform: translateY(-1px); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.cal-legend li { display: flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--cat); }
.cal__chip b { font-weight: 700; margin-right: 4px; }
.cal__more { font-size: 12px; color: var(--muted); border: 0; background: none; cursor: pointer; text-align: left; padding: 0 4px; }

/* Tablet: celdas algo más bajas */
@media (max-width: 1024px) {
  .cal__day { min-height: 92px; }
}

/* Móvil: celdas compactas con puntos (tocar el día abre el evento) */
@media (max-width: 720px) {
  .cal { padding: 12px; border-radius: 1rem; }
  .cal__weekday { font-size: 10px; letter-spacing: 0; }
  .cal__day { min-height: 52px; padding: 4px 2px; align-items: center; }
  .cal__chip { width: 8px; height: 8px; padding: 0; border-radius: 50%; font-size: 0; }
  .cal__chip b { display: none; }
  .cal__day-events { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
  .cal__more { display: none; }
  .cal__day--has-events { cursor: pointer; }
}
