/* PortCrowds fused crowd calendar (site/fusedcal.py).
   New classes only — built on style.css tokens and the .cal-cell tier
   tints. Replaces the "Next 60 days" tile strip + "Monthly crowd
   calendar" tables with one week-grid per month. */

/* ---------- Legend (one, above the first month) ---------- */
.fused-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem; color: var(--muted); margin: 6px 0 4px; font-weight: 600; }
.fused-swatch { display: inline-block; width: 15px; height: 15px; border-radius: 5px; margin-right: 6px; vertical-align: -2px; }
.fused-swatch.f-quiet { background: var(--quiet); border: 1px solid var(--quiet-ink); }
.fused-swatch.f-moderate { background: var(--moderate); border: 1px solid var(--moderate-ink); }
.fused-swatch.f-busy { background: var(--busy); border: 1px solid var(--busy-ink); }
.fused-swatch.f-packed { background: var(--packed); border: 1px solid var(--packed-ink); }
.fused-swatch.f-none { background: var(--none-bg); border: 1px dashed #cbd4de; }

/* ---------- Weekday header + month grid ---------- */
.fused-dows { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 0 0 5px; }
.fused-dows span { text-align: center; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fused-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 0 0 10px; }

/* ---------- Day cells ---------- */
.fused-cell { display: flex; flex-direction: column; gap: 1px; min-height: 96px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--none-bg); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.12s; }
a.fused-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
a.fused-cell:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
/* Tier tints match style.css .cal-cell exactly. */
.fused-cell.f-quiet { background: #d9f1e4; border: 2px solid var(--quiet); color: var(--quiet-ink); }
.fused-cell.f-moderate { background: #fae9bd; border: 2px solid var(--moderate); color: var(--moderate-ink); }
.fused-cell.f-busy { background: #fbd9b8; border: 2px solid var(--busy); color: var(--busy-ink); }
.fused-cell.f-packed { background: #f8c9c9; border: 2px solid var(--packed); color: var(--packed-ink); }
.fused-cell.f-unknown { background: var(--unknown-bg); border: 2px solid var(--unknown); color: var(--muted); }
.fused-cell.f-none { background: var(--none-bg); color: #9aa7b8; box-shadow: none; cursor: default; }
.fused-cell.f-pad { background: transparent; border: 1px solid transparent; box-shadow: none; color: #c6d0dc; }

.fused-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.fused-date { font-size: 1.02rem; font-weight: 800; line-height: 1.15; }
.fused-pill { font-size: 0.56rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2.5px 7px; border-radius: 999px; border: 1px solid currentColor; background: rgba(255, 255, 255, 0.55); white-space: nowrap; margin-top: 1px; }
.fused-pax { margin-top: auto; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; }
.fused-pax-unit { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; margin-left: 4px; }
.fused-pax-na { font-size: 0.92rem; }
.fused-pax-short { display: none; }
.fused-meta { font-size: 0.7rem; font-weight: 700; opacity: 0.85; }
.fused-none-label { margin-top: auto; font-size: 0.72rem; font-weight: 700; }

/* ---------- Narrower screens: shrink type, then the pill gives way
   to color + aria-label, then passenger counts go compact ---------- */
@media (max-width: 1020px) {
  .fused-pill { font-size: 0.52rem; padding: 2px 5px; }
  .fused-pax { font-size: 1rem; }
}
@media (max-width: 720px) {
  .fused-grid, .fused-dows { gap: 4px; }
  .fused-dows span { font-size: 0.6rem; }
  .fused-cell { min-height: 76px; padding: 6px; border-radius: 8px; }
  .fused-pill { display: none; }
  .fused-date { font-size: 0.92rem; }
  .fused-pax { font-size: 0.88rem; }
  .fused-pax-unit { display: none; }
  .fused-meta { font-size: 0.6rem; white-space: nowrap; letter-spacing: -0.01em; }
  .fused-none-label { font-size: 0.62rem; white-space: nowrap; }
}
@media (max-width: 560px) {
  .fused-cell { min-height: 66px; padding: 5px; }
  .fused-pax-full { display: none; }
  .fused-pax-short { display: inline; }
}
@media (max-width: 380px) {
  .fused-date { font-size: 0.85rem; }
  .fused-pax { font-size: 0.8rem; }
  .fused-meta { font-size: 0.56rem; }
}
