/* Day clock (day-clock.js). Applies only once the dial is live (.is-live); until then, and without JavaScript, the
   stops keep the card grid from premium.css. */
@property --mdb-day-light { syntax: "<color>"; inherits: true; initial-value: rgb(240 201 135 / 0%); }

.wp-site-blocks .mdb-day.is-live { transition: --mdb-day-light 1.2s ease; }
.wp-site-blocks .mdb-day.is-live .mdb-day-tour { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: start; max-width: none; margin-top: clamp(28px, 3vw, 48px); }
.wp-site-blocks .mdb-day.is-live .mdb-day-stops { display: block; margin: 0; }

/* The dial: sticky beside the stops, in a halo coloured by the hour. */
.mdb-day-stage { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 88px); display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 18px; height: min(82vh, 760px); background: radial-gradient(circle closest-side at 50% 42%, var(--mdb-day-light) 0, transparent 100%); transition: top .26s ease; }
.mdb-day-dial { display: block; width: auto; height: 100%; max-width: 100%; overflow: visible; }
.mdb-day-dial__rim { stroke: rgb(201 174 121 / 24%); stroke-width: 1; }
.mdb-day-dial__tick { stroke: rgb(240 238 231 / 42%); stroke-width: 1.2; }
.mdb-day-dial__tick.is-major { stroke: var(--mdb-gold, #c9ae79); stroke-width: 2; }
.mdb-day-dial__tick.is-minor { stroke: rgb(240 238 231 / 16%); stroke-width: 1; }
.mdb-day-dial__label { fill: #c3c8c1; font-family: var(--mdb-ui-font, Geist, Inter, sans-serif); font-size: 15px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.mdb-day-dial__track { stroke: rgb(240 238 231 / 7%); stroke-width: 12; }
.mdb-day-dial__window { fill: none; stroke: rgb(201 174 121 / 20%); stroke-width: 12; }
.mdb-day-dial__lit { fill: none; stroke: var(--mdb-gold, #c9ae79); stroke-width: 12; stroke-linecap: round; }
.mdb-day-dial__lit-glow { fill: none; stroke: var(--mdb-gold, #c9ae79); stroke-width: 22; opacity: .5; }
.mdb-day-dial__now { fill: #f0eee7; stroke: #121514; stroke-width: 3; }
.mdb-day-dial__photo-base { fill: #1a1f1d; }
.mdb-day-dial__photo { opacity: 0; transform: scale(1.08); transform-box: fill-box; transform-origin: center; transition: opacity .8s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.mdb-day-dial__photo.is-current { opacity: 1; transform: none; }
.mdb-day-dial__photo-ring { stroke: rgb(201 174 121 / 45%); stroke-width: 1; }
.mdb-day-dial__index { fill: var(--mdb-gold, #c9ae79); }

/* Caption under the dial: position, stop, hours and days. */
.mdb-day-caption { display: grid; justify-items: center; gap: 6px; min-height: 92px; margin: 0 !important; text-align: center; }
.mdb-day-caption > span { animation: mdb-day-caption .5s ease both; }
.mdb-day-caption__no { font-family: var(--mdb-ui-font, Geist, Inter, sans-serif); font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--mdb-gold, #c9ae79); font-variant-numeric: tabular-nums; }
.mdb-day-caption__name { font-family: var(--mdb-display-font, "Cormorant Garamond", Georgia, serif); font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; color: #f0eee7; }
.mdb-day-caption__hours { font-family: var(--mdb-ui-font, Geist, Inter, sans-serif); font-size: 13px; font-weight: 600; letter-spacing: .1em; color: var(--mdb-gold, #c9ae79); font-variant-numeric: tabular-nums; }
.mdb-day-caption__days { font-size: 13px; color: #8e958d; }
@keyframes mdb-day-caption { from { opacity: 0; transform: translateY(6px); } }

/* Stops: the photo lives in the dial; each stop holds the screen while it is current. */
.wp-site-blocks .mdb-day.is-live .mdb-day-stop { display: flex; flex-direction: column; justify-content: center; min-height: min(54vh, 500px); padding: clamp(24px, 3vw, 40px) 0 clamp(24px, 3vw, 40px) clamp(18px, 2vw, 28px); border-top: 1px solid rgb(201 174 121 / 22%); transition: background-color .45s ease, box-shadow .45s ease, border-color .45s ease; }
.wp-site-blocks .mdb-day.is-live .mdb-day-stop .wp-block-image { display: none; }
.wp-site-blocks .mdb-day.is-live .mdb-day-stop .wp-block-buttons { margin-top: 10px; }
.wp-site-blocks .mdb-day.is-live .mdb-day-stop h3 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1.04; }
.wp-site-blocks .mdb-day.is-live .mdb-day-stop.is-current { border-top-color: var(--mdb-gold, #c9ae79); background-color: rgb(201 174 121 / 5%); box-shadow: inset 2px 0 0 var(--mdb-gold, #c9ae79); }

/* The header slides away while scrolling down: the dial takes its place, as the category bars do. */
body:has(.mdb-header.is-scrolling-down:not(:focus-within)) .mdb-day-stage { top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px); }

/* Phones and narrow tablets: a band with the dial and its caption stays at the top while the stops pass. */
@media (max-width: 899px) {
  .wp-site-blocks .mdb-day.is-live .mdb-day-tour { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mdb-day-stage { top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px); z-index: 5; grid-template-rows: none; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: 4px 18px; height: min(30svh, 236px); margin-inline: calc(50% - 50vw); padding: 10px max(16px, calc(50vw - 50%)); background: radial-gradient(circle at 22% 50%, var(--mdb-day-light) 0, transparent 46%), #121514; }
  .mdb-day-stage::after { content: ""; position: absolute; inset: 100% 0 auto; height: 24px; background: linear-gradient(#121514, rgb(18 21 20 / 0)); pointer-events: none; }
  .mdb-day-caption { justify-items: start; min-height: 0; text-align: left; }
  .mdb-day-caption__name { font-size: 26px; }
  .wp-site-blocks .mdb-day.is-live .mdb-day-stops { margin-top: 12px; }
  .wp-site-blocks .mdb-day.is-live .mdb-day-stop { min-height: 40svh; }
  .wp-site-blocks .mdb-day.is-live .mdb-day-stop h3 { font-size: 34px; }
  body:has(.mdb-header.is-scrolling-down:not(:focus-within)) .mdb-day-stage { top: var(--wp-admin--admin-bar--height, 0px); }
}

@media (prefers-reduced-motion: reduce) {
  .wp-site-blocks .mdb-day.is-live, .mdb-day-stage, .wp-site-blocks .mdb-day.is-live .mdb-day-stop, .mdb-day-dial__photo { transition: none; }
  .mdb-day-caption > span { animation: none; }
}
