/* High Holiday seats (/seats/). Builds on styles.css, and on giving.css for the form fields and payment list.
   The plan sits on limestone: the hechal at the front, the bimah as a ring in the middle (the round sanctuary),
   the blocks either side of it facing in, and the rest behind. Hairlines, not boxes. */

.st-main { padding-bottom: clamp(64px, 8vw, 120px); }
/* A narrower photograph than other pages, so the seat plan starts on the first screen. Still whole, at 3:2. */
.page-hero-grid.st-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 760px) { .page-hero-grid.st-hero { grid-template-columns: minmax(0, 1fr); } }
.st-loading { margin: 0; padding: 8px 0; }
.st-loading.is-error { color: #9a3324; }
.st-empty { margin: 0; color: var(--muted); text-align: center; }

/* ---------- Not open yet ---------- */
.st-closed { max-width: 40em; padding-top: clamp(20px, 2.5vw, 32px); border-top: 1px solid var(--ink); }
.st-closed h2 { margin-bottom: .45em; }

/* ---------- Progress ---------- */
.st-steps { list-style: none; margin: 0 0 clamp(28px, 3.2vw, 44px); padding: 0 0 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.st-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.st-steps li + li::before { content: ""; width: clamp(20px, 4vw, 56px); height: 1px; background: var(--line-2); margin-right: 2px; }
.st-step-num { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: .85rem; transition: background .25s, color .25s, border-color .25s; }
.st-steps li.is-current { color: var(--ink); font-weight: 500; }
.st-steps li.is-current .st-step-num { background: var(--ink); border-color: var(--ink); color: var(--page); }
.st-steps li.is-done { color: var(--bronze-dk); }
.st-steps li.is-done .st-step-num { border-color: var(--bronze); }
@media (max-width: 560px) {
  .st-steps li:not(.is-current) .st-step-name { display: none; }
}

.st-panel-title { margin: 0 0 .35em; outline: none; scroll-margin-top: calc(var(--header-h) + 24px); }
.st-error { margin: 0 0 1.2rem; padding: .75rem 1rem; border-left: 2px solid #9a3324; background: rgba(154, 51, 36, .06); color: #8a2f21; font-weight: 500; outline: none; scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- Choosing a service ---------- */
.st-sale-list { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.st-sale-list li { border-bottom: 1px solid var(--line); }
.st-sale { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 1.1rem 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.st-sale strong { font: 400 clamp(1.4rem, 2vw, 1.75rem)/1.15 var(--serif); color: var(--ink); transition: color .2s; }
.st-sale strong::after { content: " →"; font-family: var(--sans); font-size: .65em; color: var(--bronze); }
.st-sale:hover strong { color: var(--bronze-dk); }
.st-sale-sm { color: var(--ink-2); }
.st-sale-meta { color: var(--muted); font-size: .92rem; }

/* ---------- The service and the key ---------- */
.st-sale-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 48px; flex-wrap: wrap; margin-bottom: 18px; }
.st-sale-text { min-width: 0; max-width: 46em; }
.st-change { margin-top: .5rem; }
.st-sale-desc { margin: 0 0 .25em; max-width: 46em; }
.st-deadline { margin: 0; color: var(--bronze-dk); font-weight: 500; }
.st-legend { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: .92rem; color: var(--ink-2); }
.st-legend li { display: inline-flex; align-items: center; gap: 9px; }
.st-key { width: 16px; height: 16px; flex: none; border-radius: 2px 2px 6px 6px; background: var(--paper); border: 1.5px solid var(--side); }

/* Seat colours: a cool slate for the men's seats, a dusty rose for the women's, bronze for your own. */
.st-widget { --men: #5d6c78; --women: #9a6470; --mixed: #8a7c68; }
.st-key-men, .side-men { --side: var(--men); }
.st-key-women, .side-women { --side: var(--women); }
.st-key-mixed, .side-mixed { --side: var(--mixed); }
.st-key-sel { background: var(--bronze-dk); border-color: var(--bronze-dk); }
.st-key-taken { background: var(--honey); border-color: var(--honey); background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(30, 27, 23, .12) 3px 4px); }

/* ---------- The plan ---------- */
.st-plan { background: var(--stone); padding: clamp(18px, 2.6vw, 40px) clamp(12px, 3vw, 48px) clamp(24px, 3.4vw, 52px); }
.st-stage { display: flex; justify-content: center; margin-bottom: clamp(22px, 3vw, 40px); }
.st-stage span { display: block; width: min(380px, 72%); padding: 9px 16px 18px; text-align: center; font: 400 clamp(1.1rem, 1.4vw, 1.3rem)/1.2 var(--serif); color: var(--ink); background: var(--page); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 50% 50% / 0 0 100% 100%; }

.st-front { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); align-items: center; margin-bottom: clamp(32px, 4vw, 56px); }
.st-front-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.st-center { display: grid; place-items: center; padding: 10px; }
.st-center span { width: clamp(104px, 10vw, 148px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 8px; background: var(--page); border: 1px solid var(--bronze); box-shadow: 0 0 0 9px var(--stone), 0 0 0 10px var(--rule); font: 400 clamp(1.1rem, 1.4vw, 1.3rem)/1.1 var(--serif); color: var(--ink); }

.st-rest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 52px) clamp(28px, 5vw, 80px); }
.st-rest.is-odd > :last-child { grid-column: 1 / -1; }

.st-sec { min-width: 0; }
.st-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 4px 16px; padding-bottom: 9px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.st-sec-head h3 { margin: 0; font-size: clamp(1.15rem, 1.4vw, 1.3rem); }
.st-sec-side { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--muted); }
.st-sec-side::before { content: ""; width: 9px; height: 9px; border: 1.5px solid var(--side); border-radius: 1px 1px 3px 3px; }
.st-sec-meta { margin: 0; text-align: right; font-size: .86rem; line-height: 1.35; color: var(--muted); white-space: nowrap; }
.st-sec-meta strong { font-weight: 500; color: var(--ink); }

.st-rows { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding-bottom: 2px; }
.st-rows-inner { width: max-content; min-width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.st-row { display: grid; grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr); align-items: center; gap: 8px; }
.st-row-label { font-size: .74rem; font-weight: 500; color: var(--muted); }
.st-row .st-row-label:first-child { text-align: right; }
.st-seats { display: flex; justify-content: center; gap: 4px; }
.st-aisle { width: 16px; flex: none; }
.st-seat {
  width: 30px; height: 30px; flex: none; display: inline-grid; place-items: center; padding: 0;
  border-radius: 3px 3px 9px 9px; border: 1.5px solid color-mix(in srgb, var(--side) 70%, transparent); background: var(--paper);
  color: color-mix(in srgb, var(--side) 80%, var(--ink)); font: 500 .68rem/1 var(--sans); font-variant-numeric: lining-nums tabular-nums;
  cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.st-seat:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--side); box-shadow: 0 2px 6px -3px rgba(30, 27, 23, .45); }
.st-seat:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.st-seat.is-sel { background: var(--bronze-dk); border-color: var(--bronze-dk); color: #fff; box-shadow: 0 2px 7px -3px rgba(111, 83, 47, .8); }
.st-seat.is-taken { background: var(--honey); border-color: var(--honey); cursor: not-allowed; background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(30, 27, 23, .1) 3px 4px); }

/* Blocks either side of the bimah: each row is a column, row A nearest the bimah. */
.st-facing .st-rows-inner { flex-direction: row; align-items: center; justify-content: center; gap: 6px; }
.st-facing.facing-right .st-rows-inner { flex-direction: row-reverse; }
.st-facing .st-row { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-facing .st-row .st-row-label { text-align: center; }
.st-facing .st-row .st-row-label:last-child { display: none; }
.st-facing .st-seats { flex-direction: column; }
.st-facing .st-aisle { width: auto; height: 16px; }
.st-facing.facing-right .st-seat { border-radius: 3px 9px 9px 3px; }
.st-facing.facing-left .st-seat { border-radius: 9px 3px 3px 9px; }

/* ---------- The selection, kept in view at the bottom ---------- */
.st-bar {
  position: relative; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: rgba(251, 248, 242, .97); border-top: 1px solid var(--line);
  box-shadow: 0 0 0 100vmax rgba(251, 248, 242, .97); clip-path: inset(0 -100vmax);
}
.st-bar.is-active { position: sticky; }
.st-bar-sum { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.st-bar-sum strong { font-weight: 500; color: var(--ink); }
.st-bar-sum span { font-size: .92rem; color: var(--muted); }
.st-bar .btn { flex: none; min-width: 9em; }

/* ---------- Details ---------- */
.st-details { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.st-form { max-width: 680px; }
.st-form .st-panel-title { margin-bottom: .7em; }
.st-notes { margin: -.2rem 0 1.6rem; padding-left: 18px; border-left: 1px solid var(--bronze); color: var(--ink); white-space: pre-line; }
.st-occ-hint { margin: -.3rem 0 .2rem; }
.st-occ label { display: flex; justify-content: space-between; gap: 12px; }
.st-occ-price { color: var(--muted); font-weight: 400; }
.st-field-error { margin: 6px 0 0; color: #8a2f21; font-size: .9rem; font-weight: 500; }
.gv-field input[aria-invalid="true"] { border-color: #9a3324; }
.st-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.st-summary { position: sticky; top: calc(var(--header-h) + 24px); padding-top: 6px; }
.st-summary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.st-summary h3 { margin: 0; font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.st-sum-sale { margin: .2em 0 1rem; color: var(--muted); }
.st-sum-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.st-sum-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.st-sum-list small { display: block; color: var(--muted); font-size: .9rem; }
.st-sum-list li > span:last-child { white-space: nowrap; font: 400 1.15rem/1.2 var(--serif); }
.st-sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0; padding: .9rem 0 0; color: var(--ink); }
.st-sum-total strong { font: 400 1.6rem/1 var(--serif); }
.st-sum-total strong.is-words { font: 500 .98rem/1.3 var(--sans); color: var(--ink-2); text-align: right; }
.st-sum-note { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }

/* ---------- Done ---------- */
.st-done { max-width: 760px; }
.st-done-mark { width: 56px; height: 56px; margin-bottom: 18px; }
.st-done-mark svg { width: 100%; height: 100%; fill: none; stroke: var(--bronze); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.st-done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: st-draw .6s .15s ease forwards; }
@keyframes st-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .st-done-mark path { animation: none; stroke-dashoffset: 0; } }
.st-done-when { margin: 0 0 1.2rem; font: 400 clamp(1.4rem, 2.2vw, 1.8rem)/1.2 var(--serif); color: var(--ink); }
.st-done-when span { display: block; margin-top: .2em; font: 400 1rem/1.4 var(--sans); color: var(--muted); }
.st-done-note { margin: 1.2rem 0 0; }
.st-pay { margin-top: clamp(36px, 4vw, 52px); }
.st-pay h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin-bottom: .4em; }
.st-pay .gv-pay span { display: block; color: var(--ink-2); font-size: .95rem; }
.st-done-actions { margin-top: clamp(28px, 3vw, 40px); }

/* ---------- Narrower screens ---------- */
@media (max-width: 960px) {
  .st-details { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .st-summary { position: static; order: -1; padding-top: 0; }
}
@media (max-width: 760px) {
  .st-rest { grid-template-columns: minmax(0, 1fr); }
  .st-front { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .st-center { grid-column: 1 / -1; grid-row: 1; padding: 10px 0 4px; }
  .st-center span { width: 92px; box-shadow: 0 0 0 7px var(--stone), 0 0 0 8px var(--rule); }
  .st-sec-head { flex-direction: column; align-items: flex-start; }
  .st-sec-meta { text-align: left; }
  .st-sec-meta br { display: none; }
  .st-facing .st-sec-head { min-height: 0; }
}
@media (max-width: 480px) {
  .st-plan { padding-inline: 8px; }
  .st-seat { width: 26px; height: 28px; font-size: .64rem; }
  /* One row label is enough on a phone: it leaves room for ten seats and the aisle. */
  .st-sec:not(.st-facing) .st-row { grid-template-columns: minmax(14px, auto) auto; justify-content: center; }
  .st-sec:not(.st-facing) .st-row .st-row-label:last-child { display: none; }
  .st-seats { gap: 3px; }
  .st-row { gap: 5px; }
  .st-aisle { width: 10px; }
  .st-facing .st-rows-inner, .st-facing .st-row { gap: 4px; }
  .st-legend { gap: 6px 18px; font-size: .88rem; }
  .st-bar .btn { min-width: 0; padding-inline: 1.3em; }
  .st-actions .btn { flex: 1 1 100%; }
  .st-done-actions .btn { flex: 1 1 100%; }
}

/* Marcellus draws zero as a perfect ring, so amounts are set in Figtree. */
.st-sum-list li > span:last-child, .st-sum-total strong { font-family: var(--sans); font-weight: 400; }

/* Phones: the plan comes straight after the heading, and the photograph follows the page's content, still whole,
   so no one has to scroll past it to reach the seats. */
@media (max-width: 760px) {
  .st-page main { display: flex; flex-direction: column; }
  .st-page .page-hero, .st-page .page-hero-grid { display: contents; }
  .st-page .page-hero-text { order: 0; padding: 24px var(--gutter) 0; }
  .st-page .page-hero-text h1 { margin-bottom: .35em; }
  .st-page .st-main { order: 1; }
  .st-page .page-hero-photo { order: 2; margin: 0 var(--gutter); }
}
