/* =============================================================================
   OPENING HOURS — the status board
   -----------------------------------------------------------------------------
   Replaces the three-column table that used to render here. The table squeezed
   "Every day" into a third of a 390px phone, put the time in a bordered cell
   that read as a disabled input, and gave every element the same weight so
   nothing was findable at a glance.

   The rebuild is built around one idea: THE TIME IS THE CONTENT. It gets the
   largest type on the page, in the display face, with the day label demoted to
   a small caps eyebrow above it. Everything else is chrome.

   Layout is a single column on a phone and a two-up grid from tablet, because a
   venue card is a self-contained unit and reads badly stretched across 1088px.
   ========================================================================== */

.skagit-hours {
  --sk-hours-line: rgba(11, 61, 104, 0.12);
  --sk-hours-open: #1f6b45;
  --sk-hours-open-bg: #e8f4ed;
  --sk-hours-soon: #8a5a12;
  --sk-hours-soon-bg: #fbf1de;
  --sk-hours-shut: #6b7280;
  --sk-hours-shut-bg: #eef1f4;
}

/* ---- the live summary line ---------------------------------------------- */
/* Rendered empty and filled by the script, so the page cache cannot freeze it
   at a stale time. `hidden` until it has something to say. */
.skagit-hours__now {
  margin: 0 0 var(--sk-space-lg);
  padding: 0.85rem 1.05rem;
  border-left: 3px solid var(--sk-gold-500, #b08d28);
  border-radius: 0 var(--sk-radius-sm, 8px) var(--sk-radius-sm, 8px) 0;
  background: var(--sk-gold-050, #f7f2e4);
  color: var(--sk-text, #15202b);
  font-size: var(--sk-fs-sm);
  line-height: 1.5;
}

.skagit-hours__now[hidden] { display: none; }

.skagit-hours__now b { font-weight: var(--sk-weight-semi, 600); }

/* ---- sections ------------------------------------------------------------ */
.skagit-hours__section + .skagit-hours__section {
  margin-block-start: var(--sk-space-xl);
}

.skagit-hours__section-title {
  margin: 0 0 var(--sk-space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--sk-hours-line);
  color: var(--sk-gold-700, #8a6d1f);
  font-size: var(--sk-fs-xs);
  font-weight: var(--sk-weight-black, 800);
  letter-spacing: var(--sk-tracking-eyebrow, 0.14em);
  text-transform: uppercase;
}

.skagit-hours__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sk-space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Two-up from tablet. Not three — a venue card is mostly whitespace at 340px
   and the page turns into confetti. */
@media (min-width: 48em) {
  .skagit-hours__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- the venue card ------------------------------------------------------ */
.skagit-hours__venue-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: var(--sk-space-md);
  border: 1px solid var(--sk-hours-line);
  border-radius: var(--sk-radius-lg, 16px);
  background: rgba(255, 255, 255, 0.78);
}

.skagit-hours__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.skagit-hours__name {
  margin: 0;
  font-family: var(--sk-font-display, inherit);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
  line-height: 1.2;
}

/* ---- the badge ----------------------------------------------------------- */
/* Never rendered by PHP — see the note in inc/hours.php. It stays hidden until
   the script has compared the property's clock against the parsed window. */
.skagit-hours__badge {
  flex: 0 0 auto;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--sk-hours-shut-bg);
  color: var(--sk-hours-shut);
  font-size: 0.68rem;
  font-weight: var(--sk-weight-black, 800);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.skagit-hours__badge[hidden] { display: none; }

.skagit-hours__badge--open { background: var(--sk-hours-open-bg); color: var(--sk-hours-open); }
.skagit-hours__badge--soon { background: var(--sk-hours-soon-bg); color: var(--sk-hours-soon); }

/* A dot before the word, so the state is not carried by colour alone — the
   open dot is filled, the closed one hollow. */
.skagit-hours__badge::before {
  content: "";
  display: inline-block;
  width: 0.44em;
  height: 0.44em;
  margin-right: 0.42em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  vertical-align: 0.06em;
}

.skagit-hours__badge--open::before,
.skagit-hours__badge--soon::before { background: currentColor; }

/* ---- the times ----------------------------------------------------------- */
.skagit-hours__rows { margin: 0; }

.skagit-hours__row + .skagit-hours__row {
  margin-block-start: 0.55rem;
  padding-block-start: 0.55rem;
  border-top: 1px dashed var(--sk-hours-line);
}

/*
 * THE VISUAL ORDER IS REVERSED ON PURPOSE.
 *
 * The markup is a <dl> with the day as <dt> and the time as <dd>, which is the
 * correct association for assistive tech. Visually the TIME comes first and
 * largest, because that is what the visitor came for; the day is demoted to a
 * small caps line above it. `order` does that without touching the DOM.
 */
.skagit-hours__row {
  display: flex;
  flex-direction: column;
}

.skagit-hours__when {
  order: 1;
  margin: 0;
  color: var(--sk-text-muted, #4a5867);
  font-size: 0.7rem;
  font-weight: var(--sk-weight-semi, 600);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.skagit-hours__time {
  order: 2;
  margin: 0.1rem 0 0;
  font-family: var(--sk-font-display, inherit);
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--sk-text, #15202b);
}

/* ---- dark ground --------------------------------------------------------- */
/* The page sits on the pale ground, but the shortcode is reusable and the
   footer/lounge grounds are dark. */
.skagit-hours--on-dark .skagit-hours__venue-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.skagit-hours--on-dark .skagit-hours__time,
.skagit-hours--on-dark .skagit-hours__name { color: var(--sk-text-on-dark, #eef2f7); }

@media (prefers-reduced-motion: no-preference) {
  .skagit-hours__badge { transition: background-color 200ms ease, color 200ms ease; }
}

@media print {
  .skagit-hours__now,
  .skagit-hours__badge { display: none !important; }
  .skagit-hours__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skagit-hours__venue-card { break-inside: avoid; background: none; }
}
