/* Seasons view: a month calendar of US holidays and seasonal moments, with
 * the day each one's ads should be live marked on the grid.
 *
 * Same language as the rest of the dashboard: dark crystal glass, the gold
 * accent the other pages use for labels, and blue steps for event types and
 * status. No amber, no green. Nothing here is an error, so nothing is red.
 */

#view-seasons {
  --gold: #c8a54a;
  --gold-bright: #e6c977;
  --gold-line: rgba(200, 165, 74, 0.30);
  --gold-wash: rgba(200, 165, 74, 0.12);
  --sn-blue: #60a5fa;
  --sn-blue-deep: #2563eb;
  --sn-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  --sn-line: rgba(255, 255, 255, 0.09);
  --sn-radius: 14px;
}

.sn-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 8px 130px; /* room for the floating dock */
  color: var(--text);
}

/* ---- toolbar ---- */
.sn-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sn-nav { display: flex; align-items: center; gap: 8px; }
.sn-title { margin: 0 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.sn-btn,
.sn-icon-btn {
  appearance: none;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--sn-line);
  background: var(--sn-glass);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.sn-btn { padding: 0 14px; }
.sn-icon-btn { width: 34px; font-size: 20px; line-height: 1; }
.sn-btn:hover, .sn-icon-btn:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.07); }
.sn-btn:focus-visible, .sn-icon-btn:focus-visible, .sn-chip:focus-visible,
.sn-ev:focus-visible, .sn-soon-row:focus-visible { outline: 2px solid var(--sn-blue); outline-offset: 2px; }

.sn-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--sn-glass);
  border: 1px solid var(--sn-line);
}
.sn-chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  height: 30px;
  padding: 0 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.sn-chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.sn-chip.is-on { color: var(--gold-bright); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold-line); }

/* ---- layout ---- */
.sn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

/* ---- month grid ---- */
.sn-cal {
  padding: 12px;
  border-radius: 18px;
  background: var(--sn-glass);
  border: 1px solid var(--sn-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.sn-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.sn-dow span {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.sn-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(104px, 1fr); gap: 6px; }

.sn-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.sn-cell.is-weekend { background: rgba(255, 255, 255, 0.04); }
.sn-cell.is-out { opacity: 0.38; }
.sn-cell-num { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding: 1px 3px; }
.sn-cell.is-today { border-color: rgba(96, 165, 250, 0.55); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25); }
.sn-cell.is-today .sn-cell-num {
  align-self: flex-start;
  min-width: 22px;
  text-align: center;
  border-radius: 7px;
  color: #fff;
  background: var(--sn-blue-deep);
}
.sn-cell-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.sn-ev {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  line-height: 1.25;
  overflow: hidden;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease;
}
.sn-ev:hover { filter: brightness(1.2); }
.sn-ev.is-picked { border-color: rgba(255, 255, 255, 0.7); }
.sn-ev-holiday { color: #dbeafe; background: linear-gradient(180deg, rgba(59, 130, 246, 0.55), rgba(37, 99, 235, 0.45)); }
.sn-ev-season  { color: #e2e8f0; background: linear-gradient(180deg, rgba(148, 163, 184, 0.34), rgba(100, 116, 139, 0.28)); }
.sn-ev-retail  { color: #1a1408; background: linear-gradient(180deg, #e6c977, #c8a54a); }
/* Ads-live marker: outlined, so it reads as a deadline, not an event. */
.sn-ev-live { color: #93c5fd; background: rgba(37, 99, 235, 0.08); border: 1px dashed rgba(96, 165, 250, 0.55); font-weight: 600; }
.sn-ev-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sn-blue); box-shadow: 0 0 6px var(--sn-blue); }

.sn-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 6px 2px; font-size: 12px; color: var(--muted); }
.sn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sn-key { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sn-key-holiday { background: #3b82f6; }
.sn-key-season { background: #64748b; }
.sn-key-retail { background: var(--gold); }
.sn-key-live { border: 1px dashed var(--sn-blue); background: rgba(37, 99, 235, 0.12); }

/* ---- side panel ---- */
.sn-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.sn-detail,
.sn-soon {
  padding: 18px;
  border-radius: 18px;
  background: var(--sn-glass);
  border: 1px solid var(--sn-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.sn-detail { background: radial-gradient(120% 120% at 0% 0%, rgba(37, 99, 235, 0.22), transparent 60%), var(--sn-glass); }
.sn-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.sn-detail-name { margin: 6px 0 2px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.sn-detail-date { font-size: 13px; color: var(--muted); }
.sn-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sn-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--sn-line);
}
.sn-stat-num { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.sn-stat-lbl { margin-top: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sn-detail-status {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}
.sn-detail.is-prep .sn-detail-status { color: #bfdbfe; background: rgba(96, 165, 250, 0.16); }
.sn-detail.is-live .sn-detail-status,
.sn-detail.is-today .sn-detail-status { color: #fff; background: var(--sn-blue-deep); }
.sn-detail-angle { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: #cbd5e1; }

.sn-soon { padding: 14px 10px 10px; }
.sn-soon-head { padding: 0 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.sn-soon-row {
  appearance: none;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.sn-soon-row:hover, .sn-soon-row.is-picked { background: rgba(255, 255, 255, 0.06); }
.sn-soon-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.1;
}
.sn-soon-date b { font-size: 17px; color: #fff; letter-spacing: 0; }
.sn-soon-name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; }
.sn-soon-name small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.sn-soon-in { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sn-soon-row.is-prep .sn-soon-in { color: var(--sn-blue); }
.sn-soon-row.is-live .sn-soon-in,
.sn-soon-row.is-today .sn-soon-in { color: #93c5fd; }

@media (max-width: 1100px) {
  .sn-layout { grid-template-columns: 1fr; }
  .sn-side { position: static; }
}
@media (max-width: 640px) {
  .sn-grid { grid-auto-rows: minmax(72px, auto); gap: 3px; }
  .sn-ev { font-size: 10px; padding: 2px 4px; }
  .sn-dow span { padding: 4px 2px; font-size: 10px; }
}

/* The header's client count, date range and Refresh are about Meta data,
   which this page does not use. Same treatment as Charts. */
body.seasons-active .main-header { display: none; }
body.seasons-active .sn-page { padding-top: 24px; }

/* ---- three months side by side ----
   The months take the full width; the event detail and Coming up list sit
   underneath as two panels, so each month gets enough room for its labels. */
.sn-layout { grid-template-columns: 1fr; }
.sn-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.sn-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sn-month { min-width: 0; }
.sn-month-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 4px 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.sn-month-title span { font-size: 12px; font-weight: 600; color: var(--muted); }
.sn-months .sn-dow { gap: 4px; margin-bottom: 4px; }
.sn-months .sn-dow span { padding: 2px 4px; font-size: 10px; letter-spacing: 0.06em; }
.sn-months .sn-grid { grid-auto-rows: minmax(68px, auto); gap: 4px; }
.sn-months .sn-cell { padding: 4px; border-radius: 8px; gap: 3px; }
.sn-months .sn-cell-num { font-size: 11px; }
.sn-cell.is-blank { background: transparent; border-color: transparent; }
.sn-months .sn-ev { font-size: 10.5px; padding: 2px 5px; min-height: 18px; border-radius: 5px; gap: 4px; }
.sn-months .sn-ev-dot { width: 5px; height: 5px; }

@media (max-width: 1100px) {
  .sn-months { grid-template-columns: 1fr; }
  .sn-side { grid-template-columns: 1fr; }
}

/* Wider page for three months, and names wrap only between words. */
#view-seasons .sn-page { max-width: 1760px; }
.sn-months .sn-ev { overflow-wrap: normal; word-break: normal; hyphens: none; align-items: flex-start; }
.sn-months .sn-ev-dot { margin-top: 4px; }
.sn-months .sn-ev-live { font-style: italic; }
/* Fit one long word ("Thanksgiving") on a line inside a narrow day. The
   dashed outline already says "ads live", so the dot goes in this view. */
.sn-months .sn-ev { font-size: 10px; padding: 2px 3px; letter-spacing: -0.015em; }
.sn-months .sn-ev-dot { display: none; }
.sn-months { gap: 12px; }
.sn-months .sn-grid { gap: 3px; }
.sn-months .sn-cell { padding: 3px; }
.sn-months .sn-ev { padding: 2px; }
