/* ============================================================================
 * CALENDAR — extracted styles
 * ----------------------------------------------------------------------------
 * Extracted from templates/calendar.html (Phase 2 of the style refactor).
 * Was a single inline block.
 * Loaded AFTER the page's other stylesheets so the cascade is unchanged.
 * ============================================================================ */
    /* Kill iOS double-tap-to-zoom across the WHOLE calendar page — a double-tap
       on any element (calendar cells, events, nav, the month list) no longer
       zooms. 'manipulation' still allows vertical scroll AND pinch-zoom. Scoped
       to this page (inline) so it ships without a shared-stylesheet cache bump. */
    *{ touch-action: manipulation; }
    /* Buttons additionally suppress the tap-highlight flash + text selection. */
    .cal-nav-btn, .cal-today-btn{
      -webkit-tap-highlight-color: transparent;
      user-select: none; -webkit-user-select: none;
    }
    /* The shared .show-row-cta is hidden on mobile (<=768px) in witsend.css —
       it doubles as a desktop-only hover arrow on the /shows list. But in the
       calendar's month list it's the actual "Get Tickets" / "Info" button and
       the only path to the ticket page, so the list was a dead end on mobile.
       Re-show it here (scoped to the calendar) as a comfortable tap target. */
    @media (max-width: 768px){
      .upcoming-section .show-row-cta{
        display: inline-flex; align-items: center; justify-content: center;
        min-height: 44px; padding: 0 16px; font-size: .68rem;   /* 44px tap target */
      }
    }

    /* Past dates fade so the eye immediately knows what's still buyable. */
    /* Past days fade by colour, not opacity: .4 on the cell put the date at
       2.17:1 on the charcoal. The chips of past shows are already muted. */
    .cal-day.past .cal-day-num{ color: var(--muted); }   /* upcoming days read --text-soft */
    .cal-day.past .cal-event{ opacity: .55; }
    /* Drop the colored side-stripe accents (a brand Don't); the fill carries the
       meaning. Open mic uses its brand Mic Blue token to match the legend. */
    .cal-event.headliner{ border-left: none; }
    .cal-legend-dot{ border-left: none; }
    .cal-event.open-mic{ border-left: none; background: rgba(var(--blue-rgb),.14); color: var(--blue); }
    /* A SHOWCASE (F-02): the club's colour as an outline, not a second fill —
       same brand, read apart from a headliner at a glance; the legend says so. */
    .cal-event.showcase{ background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(var(--red-rgb),.75); }
    .cal-event.showcase:hover{ background: rgba(var(--red-rgb),.14); color: var(--text); }
    .cal-legend-dot.showcase{ background: transparent; box-shadow: inset 0 0 0 1.5px var(--red); }
    /* Past chips are non-buyable: neutral, static. Declared last so it wins over
       .headliner / .open-mic for past cells. */
    .cal-event.past{ background: var(--state-hover); color: rgba(var(--ink-rgb),.4); cursor: default; box-shadow: none; }
    /* Share button in the controls row. */
    .cal-share-btn{ display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; padding: 0; background: transparent; border: none; color: var(--muted); cursor: pointer; transition: color .2s; -webkit-tap-highlight-color: transparent; }
    .cal-share-btn:hover{ color: var(--text); }
    .cal-share-btn.copied{ color: var(--green); }   /* brief copied flash */
    .cal-share-btn .ic{ width: 1.2em; height: 1.2em; }

    /* ── Desktop: fit the whole month on first load. The grid is the point of
       this page (design serves the product), so the marquee hero + cell height
       are dialed back rather than pushing weeks below the fold. ── */
    @media (min-width: 769px){
      /* Header itself is the shared compact .page-header/.page-title now; these
         just tighten the calendar-specific chrome + cell height to fit a month. */
      .cal-controls{ padding: 13px 48px; }
      .cal-wrap{ padding: 14px 48px 0; }
      .cal-month-label{ font-size:var(--type-display-size); }
      .cal-header-day{ padding: 8px 6px; }
      /* Taller cells so days aren't squat, wide bars. The compact header frees
         enough room to do this and still keep the month in view on load. */
      .cal-day{ height: 120px; }
    }
    /* ── Mobile: keep the month + year on ONE row (long months were wrapping the
       year beside the nav + share button) AND make the month-toggle arrows a
       bigger, easier tap target. ── */
    @media (max-width: 768px){
      .cal-controls{ padding: 12px 12px; }
      .cal-controls-inner{ gap: 6px; }
      .cal-nav-btn{ width: 46px; height: 46px; font-size: 1.35rem; }
      .cal-month-label{ font-size: 1.3rem; white-space: nowrap; }
    }

/* THE DAY IS THE LINK (C1, 25 Sep 2026): a day with upcoming shows is an <a>.
   It keeps the cell's table layout and its type colours; the ring shows only
   for the keyboard. */
a.cal-day-link { color: inherit; text-decoration: none; }
a.cal-day-link:focus-visible { outline: 2px solid var(--focus-ring, var(--red)); outline-offset: -2px; }

/* THE DAY PANEL (a day with several shows, Liam 4 Nov 2026). The <dialog> box
   has no padding, so a click on it (not its content) is a click on the
   backdrop. Rows come from the month list (.upcoming-section) unchanged. */
.cal-day-sheet{
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px);
  background: var(--surface-3); color: var(--text);
  width: min(440px, calc(100vw - 24px)); max-height: min(70vh, 560px);
  margin: 0; position: fixed; inset: auto; overflow: hidden;
  box-shadow: 0 18px 50px rgba(var(--shadow-rgb),.55);
}
.cal-day-sheet::backdrop{ background: rgba(var(--shadow-rgb),.35); }
.cal-day-sheet-inner{ display: flex; flex-direction: column; max-height: inherit; }
.cal-day-sheet-head{
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--border);
}
.cal-day-sheet-title{
  margin: 0; font-family: var(--font-big); font-size: 1.35rem; letter-spacing: .02em; color: var(--text);
}
.cal-day-sheet-close{
  width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cal-day-sheet-close:hover{ color: var(--text); background: rgba(var(--tint-rgb),.06); }
.cal-day-sheet-close:focus-visible{ outline: 2px solid var(--accent-ink, var(--red)); outline-offset: 2px; }
.cal-day-sheet .cal-day-sheet-list{ padding: 0 6px; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 640px){
  /* A bottom sheet: full width, on the bottom edge, where the thumb is. */
  .cal-day-sheet{
    width: 100%; max-width: none; left: 0; right: 0; bottom: 0; top: auto;
    max-height: 80vh; border-radius: 16px 16px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cal-day-sheet[open]{ animation: calSheetUp .2s ease-out; }
  /* Get Tickets keeps its 44px phone size from the .upcoming-section rule. */
}
@keyframes calSheetUp{ from{ transform: translateY(24px); opacity: .6; } to{ transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce){ .cal-day-sheet[open]{ animation: none; } }
