/* ---------- schedule / calendar ----------
   The calendar view reuses .stats-view (single centered column). These styles
   cover the month grid, the agenda list beneath it, and the birthday/debut/show
   badges. Colors come from the same theme tokens as everything else so the view
   re-skins with the active wrestler theme. */
.cal-head-actions { display: flex; align-items: center; gap: 8px; }
.cal-month-label { font-weight: 700; min-width: 9.5em; text-align: center; }
/* quiet aside on the Schedule header -- said once here, never per-event */
.cal-tz-note { opacity: 0.75; font-style: italic; }

/* inline icon: sizes to the surrounding text, inherits color via currentColor */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.13em; fill: none; }

/* ----- two-column layout: calendar (left) | listing (right) ----- */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
  padding: 12px 26px 40px;      /* align with .stats-head's 26px gutters */
  max-width: 1800px;            /* don't sprawl on ultra-wide screens */
  margin:0 auto;
}
.cal-col { min-width: 0; }
/* the agenda column scrolls independently on tall months, pinned near the grid */
.cal-col-agenda { position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow-y: auto; }
/* month-nav now lives in the calendar column, above the grid */
.cal-monthbar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
}
/* flow to a single column on tablet & smaller */
@media (max-width: 860px) {
  .cal-layout { grid-template-columns: 1fr; gap: 18px; }
  .cal-col-agenda { position: static; max-height: none; overflow: visible; }
}

/* ----- month grid (roomy, informative cells) ----- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 0;
}
.cal-dow {
  text-align: center; font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--muted); padding: 2px 0; text-transform: uppercase; font-weight: 700;
}
.cal-cell {
  position: relative; min-height: 96px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); padding: 6px 7px;
  display: flex; flex-direction: column; gap: 4px; overflow: visible;
}
.cal-cell.cal-empty { border: none; background: transparent; }
.cal-cell.cal-has { background: var(--surface-2); cursor: pointer; }
.cal-cell.cal-has:hover { border-color: var(--mint); }
.cal-cell.cal-today { outline: 2px solid var(--coral); outline-offset: -1px; }
.cal-cell:focus-visible { outline: 2px solid var(--mint); outline-offset: -1px; }
.cal-num { font-size: 0.82rem; color: var(--muted); line-height: 1; font-weight: 600; }
.cal-cell.cal-has .cal-num { color: var(--text); }
.cal-cell.cal-today .cal-num { color: var(--coral); }
.cal-marks { display: flex; flex-direction: column; gap: 3px; align-items: stretch; min-width: 0; overflow: hidden; }
/* a hovered / open cell floats above its neighbors so its popup isn't clipped by them */
.cal-cell:hover, .cal-cell:focus-visible, .cal-cell.open { z-index: 41; }
.cal-pill {
  font-size: 0.66rem; line-height: 1.25; max-width: 100%;
  padding: 2px 6px; border-radius: 5px; font-weight: 700; overflow: hidden;
  display: flex; align-items: flex-start; gap: 3px;
}
.cal-pill .ic { width: 0.85em; height: 0.85em; flex: none; margin-top: 0.1em; }
.cal-pill-show  { background: var(--mint); color: var(--ink); }
.cal-pill-bday  { background: var(--coral); color: var(--ink); }
.cal-pill-debut { background: var(--butter); color: var(--ink); }
/* title/name: up to 2 lines, break at spaces first, then ellipsis */
.cal-pill-name {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
}
.cal-pill-more { background: transparent; color: var(--muted); padding: 0 2px; font-weight: 600; white-space: nowrap; }

/* ----- cell hover/tap popup (full day details) ----- */
.cal-popup {
  position: absolute; z-index: 40; left: 50%; top: 100%;
  transform: translateX(-50%) translateY(6px);
  min-width: 210px; max-width: 280px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
/* a little pointer arrow */
.cal-popup::before {
  content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}
.cal-cell:hover .cal-popup,
.cal-cell:focus-visible .cal-popup,
.cal-cell.open .cal-popup {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
}
/* keep the popup on-screen at the row edges */
.cal-grid > .cal-cell:nth-child(7n+1) .cal-popup,
.cal-grid > .cal-cell:nth-child(7n+2) .cal-popup { left: 0; transform: translateX(0) translateY(6px); }
.cal-grid > .cal-cell:nth-child(7n+1):hover .cal-popup,
.cal-grid > .cal-cell:nth-child(7n+2):hover .cal-popup,
.cal-grid > .cal-cell:nth-child(7n+1).open .cal-popup,
.cal-grid > .cal-cell:nth-child(7n+2).open .cal-popup { transform: translateX(0) translateY(4px); }
.cal-grid > .cal-cell:nth-child(7n).cal-popup,
.cal-grid > .cal-cell:nth-child(7n) .cal-popup { left: auto; right: 0; transform: translateX(0) translateY(6px); }
.cal-grid > .cal-cell:nth-child(7n):hover .cal-popup,
.cal-grid > .cal-cell:nth-child(7n).open .cal-popup { transform: translateX(0) translateY(4px); }
.calpop-head {
  font-weight: 800; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); margin-bottom: 7px;
}
.calpop-item { margin-bottom: 8px; }
.calpop-item:last-child { margin-bottom: 0; }
.calpop-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; font-size: 0.82rem; color: var(--text); }
.calpop-meta { color: var(--muted); font-size: 0.74rem; margin-top: 2px; }
.calpop-links { display: flex; gap: 6px; margin-top: 5px; }
.calpop-anniv { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text); }
.calpop-anniv .ic { width: 1em; height: 1em; }
.calpop-anniv:first-child, .calpop-item + .calpop-anniv { margin-top: 2px; }

/* ----- agenda (fills its column) ----- */
.cal-agenda-wrap { width: 100%; }
.cal-agenda { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.cal-agenda-day {
  display: grid; grid-template-columns: 3.2em 1fr; gap: 12px; align-items: start;
  padding: 10px 12px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border);
}
.cal-agenda-today { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral) inset; }
.cal-agenda-date {
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  padding-top: 2px; color: var(--muted);
}
.cal-agenda-dow { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cal-agenda-num { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.cal-agenda-today .cal-agenda-num,
.cal-agenda-today .cal-agenda-dow { color: var(--coral); }
.cal-agenda-rows { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* one show row: time | (badges + name / venue) | links */
.cal-item-show { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.cal-time {
  font-size: 0.9rem; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px;
}
.cal-time-tba { color: var(--muted); font-weight: 700; font-size: 0.78rem; }
.cal-item-body { min-width: 0; }
.cal-item-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cal-item-title { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.cal-venue { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.cal-item-links { display: flex; gap: 6px; align-items: center; }

/* live / VOD chip */
.cal-stream {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 1px 6px 1px 5px; border-radius: 999px; color: var(--ink);
}
.cal-stream .ic { width: 0.85em; height: 0.85em; }
.cal-stream-live { background: var(--coral); color: var(--ink); }
.cal-stream-vod  { background: var(--lavender); color: var(--ink); }

/* external link chip (WU / TJPW) */
.cal-ext {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--mint); text-decoration: none; font-weight: 800; font-size: 0.66rem;
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px 1px 3px;
}
.cal-ext:hover { border-color: var(--mint); }
.cal-ext .ic { width: 0.95em; height: 0.95em; }
.cal-hide {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 6px; font-size: 0.72rem; line-height: 1; padding: 2px 6px; cursor: pointer;
}
.cal-hide:hover { color: var(--coral); border-color: var(--coral); }

/* anniversary row */
.cal-item-anniv { display: flex; align-items: center; gap: 8px; }
.cal-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 2px 8px 2px 6px; border-radius: 999px; white-space: nowrap;
  text-transform: uppercase; color: var(--ink);
}
.cal-badge .ic { width: 0.9em; height: 0.9em; }
.cal-badge-bday  { background: var(--coral); color: var(--ink); }
.cal-badge-debut { background: var(--butter); color: var(--ink); }
.cal-person { color: var(--lavender); cursor: pointer; font-weight: 700; }
.cal-person:hover { text-decoration: underline; }

/* ---------- landing "today / upcoming" strip ---------- */
.hero-schedule {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  margin: 18px auto 0; max-width: 460px; width: 100%;
}
.hero-sched-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px;
}
.hero-sched-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.hero-sched-title .ic { width: 1.05em; height: 1.05em; color: var(--mint); }
.hero-sched-list { display: flex; flex-direction: column; gap: 7px; }
.hero-sched-item {
  font-size: 0.86rem; color: var(--text); padding: 7px 12px;
  border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); width: 100%;
  display: flex; align-items: center; gap: 7px; justify-content: center;
  text-align: center; flex-wrap: wrap;
}
.hero-sched-show .hs-title { font-weight: 600; }
.hero-sched-anniv {
  cursor: pointer; font-weight: 700;
  background: linear-gradient(90deg, var(--coral), var(--butter));
  color: var(--ink); border: none;   /* theme's 'text on accent' -> readable on every skin */
  animation: hs-pop 2.4s ease-in-out infinite;
}
.hero-sched-anniv b { color: var(--ink); }
.hero-sched-anniv .hs-icon { font-size: 1.05rem; }
@keyframes hs-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.hero-sched-show .hs-when { font-weight: 800; color: var(--mint); }
.hs-time { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.hs-venue { color: var(--muted); }

/* ---------- birthday badge + celebration effect ----------
   A person whose birthday is today gets a sparkle badge on their photo cards
   and profile; the profile view adds a soft celebratory glow. Both are toggled
   by a body-level flag list built from /api/birthdays/today (see app.js). */
.bday-badge {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  font-size: 1rem; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  animation: bday-bounce 1.8s ease-in-out infinite;
}
@keyframes bday-bounce {
  0%,100% { transform: translateY(0) rotate(-6deg); }
  50%     { transform: translateY(-3px) rotate(6deg); }
}
.profile-bday-glow {
  animation: bday-glow-shadow 3s ease-in-out infinite;
}
@keyframes bday-glow-shadow {
  0%,100% { box-shadow: 0 0 18px 2px var(--coral); }
  33%     { box-shadow: 0 0 18px 2px var(--butter); }
  66%     { box-shadow: 0 0 18px 2px var(--mint); }
}

/* confetti burst: fixed pieces animated in, cleaned up by JS after the run */
.confetti-piece {
  position: fixed; top: -12px; width: 9px; height: 14px; z-index: 9999;
  pointer-events: none; opacity: 0.9; border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.2; }
}
