/* =====================================================================
   Fiestas Yoselin v6.3.0 — Calendario visual de eventos
   Complementa styles.css (usa sus tokens).
   ===================================================================== */

.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-title { font-size: 18px; font-weight: 800; color: var(--brand-navy); min-width: 190px; text-transform: capitalize; }
.cal-nav { display: inline-flex; gap: 6px; }
.cal-nav button { width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); font-size: 18px; cursor: pointer; }
.cal-nav button:hover { background: var(--bg-card); }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.cal-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.cal-grid { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cal-week-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-card); }
.cal-week-head div { padding: 10px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); text-align: center; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 116px; border-right: 1px solid var(--border-color); border-top: 1px solid var(--border-color); padding: 6px; position: relative; cursor: pointer; transition: background .15s ease; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg-card); }
.cal-cell.other { background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,.015) 6px, rgba(0,0,0,.015) 12px); color: var(--text-muted); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-daynum { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.cal-cell.today .cal-daynum { color: var(--primary-dark); }
.cal-ev { display: block; margin-top: 4px; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; background: var(--bg-card); }
.cal-ev.st-pendiente  { border-color: var(--warning); }
.cal-ev.st-confirmado { border-color: var(--info); }
.cal-ev.st-entregado  { border-color: var(--primary); }
.cal-ev.st-completado { border-color: var(--success); }
.cal-ev.st-cancelado  { border-color: var(--danger); text-decoration: line-through; opacity: .6; }
.cal-more { display: block; margin-top: 4px; font-size: 11px; color: var(--primary-dark); font-weight: 700; }

/* Resumen del día en el modal */
.cal-day-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.cal-day-item:last-child { border-bottom: none; }
.cal-day-item .di-main { min-width: 0; }
.cal-day-item .di-num { font-weight: 700; }
.cal-day-item .di-cli { color: var(--text-secondary); font-size: 13px; }
.cal-day-item .di-total { font-weight: 800; color: var(--brand-navy); white-space: nowrap; }

/* ===================== Móvil: agenda en lugar de rejilla ===================== */
@media (max-width: 720px) {
    .cal-cell { min-height: 62px; padding: 4px; }
    .cal-ev, .cal-more { display: none; }     /* en móvil no caben; se usan puntos de color */
    .cal-dots { position: absolute; bottom: 6px; left: 6px; display: flex; gap: 3px; }
    .cal-dots .d { width: 7px; height: 7px; border-radius: 50%; }
    .cal-legend { width: 100%; margin-left: 0; }
}
@media (min-width: 721px) { .cal-dots { display: none; } }
