/* Checkout. Layered on site.css for tokens, buttons, fields and receipt lines.
   Same language as the site: sentence-case labels, prices in the display face,
   rows instead of boxes, and the summary as the one raised surface. */

/* Progress: where you are and what comes next, over a bar that fills. */
.co__prog { position: relative; }
.co__prog__in { display: flex; align-items: baseline; gap: 10px 24px; padding-block: 14px; }
.co__back { padding: 0; border: 0; background: none; font-size: 15px; color: var(--muted); }
.co__step { font-size: 15px; color: var(--muted); }
.co__step b { margin-left: 6px; font: var(--display-weight) calc(1.25rem * var(--ds))/1 var(--display); letter-spacing: var(--display-track); color: var(--ink); }
.co__next { margin-left: auto; font-size: 14px; color: var(--muted); }
.co__track { height: 3px; background: var(--line); }
.co__track i { display: block; height: 100%; background: var(--accent); transition: width 500ms var(--ease); }

.co { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: clamp(28px, 4vw, 48px) 7rem; }
.co__main { display: grid; gap: clamp(36px, 5vw, 56px); min-width: 0; }
.co__block { display: grid; gap: 16px; min-width: 0; }
.co__h { font-size: calc(clamp(1.9rem, 3.4vw, 2.6rem) * var(--ds)); }
.co__note { margin-top: -6px; font-size: 14px; color: var(--muted); }
.co__grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.co__grid2--stack { grid-template-columns: 1fr; }
.co__full { grid-column: 1 / -1; }
.co__cal { padding: clamp(14px, 2.4vw, 22px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.co__secure { font-size: 14px; color: var(--muted); }
.co__secure b { color: var(--ink); font-weight: 600; }

/* What is already decided folds to a line with a Change link, so the guest
   reaches the button without scrolling past their own choices. */
.folds { display: grid; border-top: 1px solid var(--line); }
.fold { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fold--open { grid-template-columns: 1fr; gap: 16px; padding-block: 18px 22px; }
.fold__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fold__media { width: 72px; aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--r-img) * .6); }
.fold__media .frame { height: 100%; border-radius: inherit; }
.fold__body { display: grid; gap: 2px; grid-column: span 1; }
.fold:not(:has(.fold__media)) .fold__body { grid-column: 1 / 3; }
.fold__k { font-size: 13px; font-weight: 500; color: var(--muted); }
.fold__v { font: var(--display-weight) calc(1.35rem * var(--ds))/1.15 var(--display); letter-spacing: var(--display-track); }
.fold__body small { font-size: 14px; color: var(--muted); }
.fold__edit, .fold__top .link { font-size: 14px; }
.fold--counts { grid-template-columns: 1fr 1fr; gap: 24px; }
.fold--counts .stepperin { padding: 0; border: 0; }
.pick__body em.is-off { color: var(--accent-ink); }
/* The party does not fit: say so plainly and offer the ways out as buttons. */
.fitrec { grid-column: 1 / -1; display: grid; gap: 12px; padding: 14px 16px; border-radius: calc(var(--r-card) / 2); background: color-mix(in oklab, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); }
.fitrec p { font-size: 15px; line-height: 1.45; }
.fitrec__go { display: flex; flex-wrap: wrap; gap: 8px; }
.fitrec__go .btn { white-space: normal; text-align: left; line-height: 1.25; padding-block: 9px; }
.fitrec__why { font-size: 13px !important; color: var(--muted); }
.pick__opt:has(input:disabled) { opacity: .55; cursor: not-allowed; }

/* Rooms are chosen by looking: the picture, the name in the display face, the
   price. Chosen is a ring on the picture, not a filled box. */
.pick { display: grid; gap: clamp(20px, 3vw, 28px) 18px; }
.pick__opt { position: relative; cursor: pointer; }
.pick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.pick__card { display: grid; gap: 10px; height: 100%; }
.pick__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-img); background: var(--line); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color 150ms ease; }
.pick__media .frame { height: 100%; border-radius: inherit; }
.pick__body { display: grid; gap: 4px; }
.pick__card b { font: var(--display-weight) calc(1.4rem * var(--ds))/1.15 var(--display); letter-spacing: var(--display-track); }
.pick__card small { font-size: 14px; color: var(--muted); }
.pick__card em { font-style: normal; font-size: 14px; color: var(--muted); }
.pick__tag { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font: 600 12px/1.5 var(--body); font-style: normal; letter-spacing: 0; color: var(--ink); }
.pick__opt input:checked + .pick__card .pick__media { outline-color: var(--accent); }
.pick__opt input:checked + .pick__card b { color: var(--accent-ink); }
.pick__opt input:focus-visible + .pick__card .pick__media { outline-color: var(--ink); }

/* How much now: two rows, a ring marks the choice. */
.pick--two { gap: 0; }
.pick--two .pick__card { grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.pick--two .pick__opt:last-child .pick__card { border-bottom: 1px solid var(--line); }
.pick--two .pick__card::before { content: ''; grid-row: span 2; align-self: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); }
.pick--two .pick__opt input:checked + .pick__card::before { border: 6px solid var(--accent); }
.pick--two .pick__card b { color: var(--ink); }

.stepperin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stepperin > span { font-size: 15px; }
.stepperin div { display: flex; align-items: center; gap: 6px; }
.stepperin button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 1.1rem; }
.stepperin output { min-width: 1.8rem; text-align: center; font: var(--display-weight) calc(1.4rem * var(--ds))/1 var(--display); }

.addons { display: grid; }
.addon { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer; }
.addon:last-child { border-bottom: 1px solid var(--line); }
.addon input { width: 18px; height: 18px; accent-color: var(--accent); align-self: center; }
.addon span { display: grid; gap: 2px; }
.addon b { font: var(--display-weight) calc(1.25rem * var(--ds))/1.2 var(--display); }
.addon small { font-size: 14px; color: var(--muted); }
.addon em { font-style: normal; font-weight: 600; text-align: right; white-space: nowrap; }
.addon em small { display: block; font-weight: 400; }

.toggle { display: flex; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

.methods { display: flex; gap: 4px; padding: 4px; border-radius: max(var(--r-bar), 4px); background: var(--tint); }
.method { flex: 1; min-height: 42px; border: 0; border-radius: max(calc(var(--r-bar) - 4px), 2px); background: transparent; font-size: 15px; font-weight: 500; color: var(--muted); }
.method.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.method__panel { display: grid; gap: 14px; }
.upi-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.upi-app { min-height: 50px; border: 1px solid var(--line); border-radius: calc(var(--r-card) / 2); background: var(--surface); font-weight: 600; }
.upi-app:hover { border-color: var(--ink); }

/* The summary is a receipt: a sheet on a phone, a sticky card on a desk. */
.sum { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; max-height: 70svh; overflow: auto; overscroll-behavior: contain; padding: 20px var(--gut); border-top: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0; background: var(--surface); box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .35); transform: translateY(calc(100% + 90px)); transition: transform 300ms var(--ease); }
.sum.is-open { transform: none; }
.sum__head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sum__title { font: var(--display-weight) calc(1.6rem * var(--ds))/1.15 var(--display); letter-spacing: var(--display-track); }
.sum__sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.sum__empty { padding: 16px 0; font-size: 15px; color: var(--muted); }
.sum__rest { margin-top: -8px; font-size: 14px; color: var(--muted); }
.sum__trust { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sum__more { margin: 2px 0 10px; font-size: 14px; }
.sum__lines { margin-bottom: 12px; }
.sum .co__go { display: none; margin-top: 6px; }

.co__bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.co__barsum { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; font-size: 13px; line-height: 1.3; color: var(--muted); }
.co__barsum b { font: var(--display-weight) calc(1.35rem * var(--ds))/1 var(--display); color: var(--ink); }
.co__barsum span { display: block; text-decoration: underline; text-underline-offset: 3px; }
.co__bar .btn { flex-shrink: 0; }

.paying { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(12, 12, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.paying__card { display: grid; justify-items: center; gap: 10px; padding: 32px 40px; border-radius: var(--r-card); background: var(--surface); color: var(--ink); text-align: center; }
.paying__card p { font: var(--display-weight) calc(1.4rem * var(--ds))/1.2 var(--display); }
.paying__card small { color: var(--muted); }
.paying__spin { width: 44px; height: 44px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { display: grid; gap: 20px; max-width: 640px; padding-block: clamp(40px, 6vw, 72px) clamp(72px, 10vw, 128px); }
.done__tick svg { width: 60px; height: 60px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.done__tick circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .7s ease forwards; }
.done__tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done__kicker { font-size: 15px; color: var(--muted); }
.done__title { font-size: calc(clamp(2.4rem, 5vw, 3.8rem) * var(--ds)); }
.done__card { padding: 6px clamp(18px, 3vw, 26px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.done__card .line:last-child { border-bottom: 0; }
.done__card .line span:last-child { text-align: right; white-space: normal; }
.done__ref { font: var(--display-weight) calc(1.25rem * var(--ds))/1 var(--display); letter-spacing: .04em; }
.done__note { font-size: 15px; color: var(--muted); }
.done__actions { display: grid; gap: 10px; }
.done__demo { display: grid; gap: 12px; margin-top: 12px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-card); background: var(--deep); color: var(--on-deep); }
.done__demo h2 { font-size: calc(1.5rem * var(--ds)); }
.done__demo p { color: var(--deep-muted); }
.done__demo .btn { background: var(--band-btn); color: var(--band-btn-ink); }

/* On a phone eight full pictures would push the dates off the bottom of a very
   long scroll, so each room becomes a row: thumbnail, name, price. */
@media (max-width: 699px) {
  .co__next { display: none; }
  .fold--counts { grid-template-columns: 1fr; gap: 8px; }
  .pick:not(.pick--two) { gap: 0; }
  .pick:not(.pick--two) .pick__card { grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
  .pick:not(.pick--two) .pick__opt:last-child .pick__card { border-bottom: 1px solid var(--line); }
  .pick:not(.pick--two) .pick__media { aspect-ratio: 1; }
  .pick:not(.pick--two) .pick__card b { font-size: calc(1.2rem * var(--ds)); }
}
@media (min-width: 560px) {
  .co__grid2--stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  .pick:not(.pick--two) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upi-apps { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .co__prog__in { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 28px; }
  .co { grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(40px, 5vw, 72px); padding-block: clamp(36px, 5vw, 56px) clamp(72px, 10vw, 128px); align-items: start; }
  .sum .co__go { display: flex; }
  .co__go { min-height: 54px; font-size: 16px; }
  .sum { position: sticky; top: calc(var(--head-h) + 20px); bottom: auto; z-index: 1; max-height: none; padding: clamp(20px, 2vw, 28px); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); transform: none; }
  .co__bar { display: none; }
}
