/* ==========================================================
   SCF multi-venue "Dates & Tickets" calendar
   Matches sydneycomedyfest.com.au: black ground, white text,
   theme font stack, #416FB3 buttons (bg4) with darker hover.
   ========================================================== */
.scf-dates {
  --scf-blue: #416fb3;
  --scf-blue-dark: #2f5791;
  --scf-line: rgba(255, 255, 255, .14);
  --scf-panel: rgba(255, 255, 255, .06);
  color: #fff;
  font-family: inherit;
  margin-top: 24px;
}
.scf-dates__summary { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.scf-dates__range { margin: 0 0 16px; font-size: 1rem; }

/* Toggle button – same build as the theme's .button.btn-buy */
.scf-dates__toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 24px; border: 0; border-radius: 2px;
  background: var(--scf-blue); color: #fff; cursor: pointer;
  font-family: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2; text-transform: uppercase;
  transition: background-color .2s;
}
.scf-dates__toggle:hover, .scf-dates__toggle:focus-visible { background: var(--scf-blue-dark); }
.scf-dates__toggle:focus-visible, .scf-cal__day:focus-visible, .scf-cal__nav:focus-visible,
.scf-session__buy:focus-visible, .scf-dates__all:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.scf-dates__toggle svg { width: 18px; height: 18px; flex: none; }
.scf-dates__chev { transition: transform .25s; }
.scf-dates__toggle[aria-expanded="true"] .scf-dates__chev { transform: rotate(180deg); }

/* Expanding panel */
.scf-dates__panel {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease;
}
.scf-dates__panel.is-open { grid-template-rows: 1fr; }
.scf-dates__inner { overflow: hidden; }
.scf-dates__box { margin-top: 8px; padding: 16px; background: var(--scf-panel); border-radius: 2px; }

/* Month grid */
.scf-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.scf-cal__month { margin: 0; font-size: 1rem; font-weight: 600; }
.scf-cal__nav {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--scf-line); border-radius: 2px; color: #fff; cursor: pointer;
}
.scf-cal__nav:hover:not(:disabled) { border-color: #fff; }
.scf-cal__nav:disabled { opacity: .3; cursor: default; }
.scf-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.scf-cal__dow { font-size: .72rem; opacity: .6; padding: 4px 0; }
.scf-cal__day {
  aspect-ratio: 1; min-height: 34px; display: grid; place-items: center;
  font: inherit; font-size: .85rem; color: rgba(255, 255, 255, .35);
  background: transparent; border: 0; border-radius: 2px; padding: 0;
}
.scf-cal__day.has-show { background: var(--scf-blue); color: #fff; font-weight: 600; cursor: pointer; }
.scf-cal__day.has-show:hover { background: var(--scf-blue-dark); }
.scf-dates { --scf-red: #d64545; --scf-amber: #f0a30a; --scf-green: #2fa866; }
.scf-cal__day.has-show.st-sold-out { background: var(--scf-red); color: #fff; }
.scf-cal__day.has-show.st-selling-fast { background: var(--scf-amber); color: #1a1a1a; }
.scf-cal__day.has-show.st-show-added { background: var(--scf-green); color: #fff; }
.scf-cal__day.has-show.st-cancelled { background: transparent; color: rgba(255,255,255,.5); text-decoration: line-through; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.scf-cal__day.has-show:hover { filter: brightness(1.12); }
.scf-cal__day.is-selected { background: #fff !important; color: #000 !important; box-shadow: inset 0 0 0 3px var(--scf-blue); filter: none; }
.scf-cal__day.is-selected.st-sold-out { box-shadow: inset 0 0 0 3px var(--scf-red); }
.scf-cal__day.is-selected.st-selling-fast { box-shadow: inset 0 0 0 3px var(--scf-amber); }
.scf-cal__day.is-selected.st-show-added { box-shadow: inset 0 0 0 3px var(--scf-green); }
/* Key */
.scf-cal__key { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .75rem; }
.scf-cal__key[hidden] { display: none; }
.scf-key { display: flex; align-items: center; gap: 6px; }
.scf-key::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--scf-blue); flex: none; }
.scf-key--show-added::before { background: var(--scf-green); }
.scf-key--selling-fast::before { background: var(--scf-amber); }
.scf-key--sold-out::before { background: var(--scf-red); }

/* Session list */
.scf-sessions { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--scf-line); }
.scf-session {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 12px;
  padding: 14px 0; border-bottom: 1px solid var(--scf-line);
}
.scf-session[hidden] { display: none; }
.scf-session__date { grid-row: span 2; text-align: center; line-height: 1.05; text-transform: uppercase; }
.scf-session__date b { display: block; font-size: 1.45rem; }
.scf-session__date span { font-size: .7rem; opacity: .75; }
.scf-session__venue { margin: 0; font-weight: 600; line-height: 1.3; }
.scf-session__meta { margin: 2px 0 0; font-size: .85rem; line-height: 1.4; opacity: .85; }
.scf-session__buy {
  grid-column: 2; justify-self: start; margin-top: 8px; padding: 10px 18px; border-radius: 2px;
  background: var(--scf-blue); color: #fff; text-decoration: none; text-transform: uppercase;
  font-size: .78rem; font-weight: 600; white-space: nowrap; transition: background-color .2s;
}
.scf-session__buy:hover { background: var(--scf-blue-dark); color: #fff; }
.scf-session__flag {
  grid-column: 2; justify-self: start; margin-top: 6px; padding: 2px 6px;
  background: rgba(65, 111, 179, .5); font-size: .72rem; text-transform: uppercase;
}
.scf-session__flag--soon { background: #fff; color: #000; font-weight: 600; font-size: .78rem; padding: 6px 10px; margin-top: 8px; }
a.scf-dates__toggle { text-decoration: none; }
.scf-session__flag--cancelled { background: rgba(255, 255, 255, .15); }
.scf-session__flag--sold-out { background: var(--scf-red); color: #fff; font-weight: 600; }
.scf-session__flag--selling-fast { background: var(--scf-amber); color: #1a1a1a; font-weight: 600; }
.scf-session__flag--show-added { background: var(--scf-green); color: #fff; font-weight: 600; }
.scf-dates__all {
  margin-top: 12px; padding: 0; background: none; border: 0; color: var(--scf-blue);
  font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer;
}
.scf-dates__all[hidden] { display: none; }
.scf-dates__empty { margin: 16px 0 0; font-size: .9rem; }

/* Shortcut button sitting on the hero image (same spot as the old floating Get Tickets) */
.scf-hero-btn {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  padding: 16px 32px; border-radius: 2px; background: #416fb3; color: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
  text-transform: uppercase; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: background-color .2s;
}
.scf-hero-btn:hover, .scf-hero-btn:focus-visible { background: #2f5791; color: #fff; }
/* Keep text white against the theme's link colours (visited / focus / active) */
.scf-hero-btn:visited, .scf-hero-btn:focus, .scf-hero-btn:active,
.scf-session__buy:visited, .scf-session__buy:focus, .scf-session__buy:active,
a.scf-dates__toggle:visited, a.scf-dates__toggle:focus { color: #fff; }
.scf-hero-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) { .scf-hero-btn { left: 10px; bottom: 10px; padding: 12px 18px; font-size: .85rem; } }

.scf-dates .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .scf-dates__panel, .scf-dates__chev { transition: none; }
}
