/* Photo-real seasonal themes (seasons-real.js). Takes over only once the season's pictures
   have loaded (html.sr-on). The season sits in the backgrounds and in the interface, never
   across the top of the page. Decoration only: never blocks taps. */

/* nothing hangs along the top any more, and the app gets that space back */
.sr-on .festive-garland, .sr-on .festive-lights { display: none; }
:root.sr-on.festive-app { --safe-t: env(safe-area-inset-top, 0px); }
.sr-fx-on .sz-fx { display: none; }
.sr-deco { pointer-events: none; user-select: none; }
.sr-deco img, img.sr-deco { -webkit-user-drag: none; }

/* ---------- the app: the season is the backdrop of every screen and the side menu ---------- */
/* a soft veil keeps the middle of the picture calm, so names and buttons stay easy to read */
html:root.sr-bg-on body:not(.staff-mode) {
  --as-backdrop: linear-gradient(to bottom, rgba(255, 255, 255, .08), rgba(255, 255, 255, .58) 30%, rgba(255, 255, 255, .7) 70%, rgba(255, 255, 255, .3)), var(--sr-bg);
  --as-rail: var(--sr-bg);
}
@media (min-width: 768px) {
  html:root.sr-bg-on body:not(.staff-mode) .rail::before { background: linear-gradient(to bottom, color-mix(in srgb, var(--as-card) 38%, transparent), color-mix(in srgb, var(--as-card) 62%, transparent) 20%, color-mix(in srgb, var(--as-card) 62%, transparent) 74%, transparent); }
}
@media (prefers-color-scheme: dark) {
  html:root.sr-bg-on:not([data-theme]) body:not(.staff-mode) {
    --as-backdrop: linear-gradient(rgba(28, 14, 34, .66), rgba(28, 14, 34, .78)), var(--sr-bg);
    --as-rail: linear-gradient(rgba(28, 14, 34, .6), rgba(28, 14, 34, .72)), var(--sr-bg);
  }
}

/* a real garland as the line under a title */
.sr-line { display: block; width: min(300px, 74%); height: 30px; margin: 6px auto 10px; background: var(--sr-cord) center / auto 100% repeat-x; -webkit-mask: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18)); }
html.sr-on body:not(.staff-mode) .home-name::after { display: none; }

/* two ornaments resting on the corner of the booking button */
.sr-on .home-acts { position: relative; }
.sr-perch { position: absolute; z-index: 2; right: 34px; top: 0; transform: translateY(-80%); display: flex; align-items: flex-end; gap: 0; }
.sr-perch img { display: block; height: auto; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .28)); transform-origin: 50% 100%; }
.sr-perch-a { width: auto; max-width: 38px; max-height: 46px; transform: rotate(-8deg); animation: sr-nod 5.5s ease-in-out infinite; }
.sr-perch-b { width: auto; max-width: 30px; max-height: 38px; margin-left: -8px; transform: rotate(9deg); animation: sr-nod 6.5s ease-in-out -2s infinite reverse; }
@keyframes sr-nod { 0%, 100% { rotate: -2deg; } 50% { rotate: 2.5deg; } }

/* one small ornament beside each screen's title */
img.sr-title { display: inline-block; width: auto; height: 1.15em; margin-left: .4em; vertical-align: -.18em; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .22)); }

/* a little row of ornaments at the foot of the side menu (iPad and computer) */
.sr-foot { display: none; }
@media (min-width: 1100px) {
  .sr-foot { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
  .sr-foot img { width: 38px; height: auto; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .25)); }
  .sr-foot img:nth-child(2) { width: 46px; }
}
body.staff-mode .sr-deco { display: none; }
body.sheet-open .sr-fx { display: none; }

/* ---------- the website: a garland under each section heading ---------- */
.festive-site .section-head .sr-line { margin: 14px auto 0; height: 34px; width: min(360px, 80%); }

@media (prefers-reduced-motion: reduce) { .sr-perch img { animation: none; } }

/* ---------- staff calendar: decorations only in the empty spaces ---------- */
.sr-staff { position: absolute; pointer-events: none; user-select: none; z-index: 0; transition: opacity .6s ease; }
.cal-bar, #schedule { position: relative; }
.cal-bar > :not(.sr-staff) { position: relative; z-index: 1; }
.sr-staff img { position: absolute; display: block; height: auto; -webkit-user-drag: none; transform-origin: 50% 0; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.sr-staff-cord { position: absolute; left: 0; right: 0; background: var(--sr-cord) center / auto 100% repeat-x; -webkit-mask: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); opacity: .9; }

/* top bar: a slim garland through the middle of the empty gap, small ornaments hanging from it */
.sr-staff-top { top: 0; bottom: 0; }
.sr-staff-top .sr-staff-cord { top: 2px; height: 20px; }
.sr-staff-top img { top: calc(16px + var(--len, 6px) * .35); width: 20px; margin-left: -10px; animation: sr-staff-sway 6s ease-in-out infinite; animation-delay: var(--d, 0s); }

/* under the last hour: a garland along the bottom with ornaments resting on it */
.sr-staff-bottom { left: 10px; right: 10px; bottom: 4px; }
.sr-staff-bottom .sr-staff-cord { bottom: 0; height: 30px; }
.sr-staff-bottom img { bottom: 14px; width: 28px; margin-left: -14px; transform-origin: 50% 100%; animation: sr-staff-nod 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes sr-staff-sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes sr-staff-nod { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }
@media (prefers-reduced-motion: reduce) { .sr-staff img { animation: none; } }
/* the photographed arrangement: its left cluster rests in the left corner, its right cluster in the right one */
.sr-staff-bottom .sr-ledge { position: absolute; bottom: 0; top: 0; width: min(50%, var(--sr-half, 50%)); background: var(--sr-ledge) no-repeat; background-size: auto 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .14)); }
.sr-staff-bottom .sr-ledge-l { left: 0; background-position: left bottom; -webkit-mask: linear-gradient(to right, #000 60%, transparent); mask: linear-gradient(to right, #000 60%, transparent); }
.sr-staff-bottom .sr-ledge-r { right: 0; background-position: right bottom; -webkit-mask: linear-gradient(to left, #000 60%, transparent); mask: linear-gradient(to left, #000 60%, transparent); }

/* ---------- staff area on iPad and computer: the season's photo behind the calendar ---------- */
/* The photo shows fully along the top (behind the toolbar and the day's numbers) and fades to a
   soft veil further down, and the calendar sheet itself turns a little more solid, so the
   bookings stay as easy to read as before. Phones keep the plain satin. */
@media (min-width: 768px) {
  html.sr-bg-on body.staff-mode {
    --cs-bg: linear-gradient(to bottom, rgba(255, 255, 255, .06), rgba(255, 255, 255, .34) 24%, rgba(255, 255, 255, .62) 55%, rgba(255, 255, 255, .5)), var(--sr-bg);
    --cs-glass: rgba(255, 255, 255, .72);
    --cs-glass-strong: rgba(255, 255, 255, .88);
  }
  html.sr-bg-on body.staff-mode .staff-main { background: var(--cs-bg) center top / cover no-repeat fixed; }
}
@media (min-width: 768px) and (prefers-color-scheme: dark) {
  html.sr-bg-on:not([data-theme]) body.staff-mode {
    --cs-bg: linear-gradient(to bottom, rgba(28, 14, 34, .5), rgba(28, 14, 34, .7) 30%, rgba(28, 14, 34, .82)), var(--sr-bg);
    --cs-glass: rgba(40, 22, 44, .72);
    --cs-glass-strong: rgba(40, 22, 44, .88);
  }
}
