/* ==========================================================================
   Kuhlman Pickleball - the booking flow
   Loaded on /book, /book/court, /book/time, /book/details and /book/done only.
   Extends site.css + components.css; never restyles anything outside the flow.
   ========================================================================== */

/* ------------------------------------------------------------ page header */
.book-head { padding: 44px 0 48px; }
.book-head .eyebrow { color: var(--lime); }
/* The generic .section rule leaves ~72px of nothing between the navy header
   and the first thing you can actually click. Mid-flow that is a scroll. */
.book-head + .section { padding-top: 34px; }

/* --------------------------------------------------------------- stepper */
.book-steps {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  margin: 0 0 30px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: 100px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.book-step { text-decoration: none; }
.book-step.done:hover .lbl { color: var(--lime-700); }
.book-step.done:hover .dot { background: var(--lime-600); border-color: var(--lime-600); }
.book-step .dot { transition: background .18s, border-color .18s, transform .18s; }
.book-step.current .dot { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(1, 29, 58, .08); }
.book-steps > .bar { flex: 1; width: auto; min-width: 12px; transition: background .25s; }
.book-steps > .bar.filled { background: var(--lime); }

/* ------------------------------------------------------- assurance strip */
.assure-row {
  list-style: none; display: grid; gap: 12px; margin: 0 0 28px;
  grid-template-columns: repeat(3, 1fr);
}
.assure-row li {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: .87rem; color: var(--body); line-height: 1.5;
}
.assure-row svg { width: 19px; height: 19px; color: var(--lime-700); flex: none; margin-top: 1px; }
.assure-row b { color: var(--ink); font-weight: 600; }

/* ================================================== step 1 - lesson types */
.lesson-grid { display: grid; gap: 14px; }
.lesson-card {
  position: relative; display: grid; align-items: center; gap: 20px;
  grid-template-columns: 58px 1fr auto;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; text-decoration: none;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.lesson-card:hover { transform: translateY(-2px); border-color: var(--lime-600); box-shadow: var(--shadow); }
.lesson-card.selected { border-color: var(--lime-600); background: var(--lime-50); }
.lesson-card .flag {
  position: absolute; top: -10px; left: 22px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--navy-900); color: var(--lime);
  font-family: var(--display); font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 100px;
}
.lesson-card .flag svg { width: 12px; height: 12px; }
.lesson-icon {
  width: 58px; height: 58px; border-radius: 16px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--lime-50); color: var(--lime-700); border: 1px solid var(--lime-100);
}
.lesson-icon svg { width: 26px; height: 26px; }
.lesson-card.selected .lesson-icon { background: var(--navy-900); color: var(--lime); border-color: var(--navy-900); }
.lesson-body { display: block; min-width: 0; }
.lesson-body h3 { font-size: 1.12rem; margin-bottom: 3px; }
.lesson-body p { font-size: .9rem; color: var(--body); margin-bottom: 10px; max-width: 56ch; }
.lesson-body .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-body .meta svg { width: 13px; height: 13px; }
.lesson-buy {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  padding-left: 22px; border-left: 1px solid var(--line); align-self: stretch;
  justify-content: center; min-width: 132px;
}
.lesson-card.selected .lesson-buy { border-left-color: var(--lime-100); }
.lesson-buy .price {
  font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  color: var(--ink); white-space: nowrap; line-height: 1.1;
}
.lesson-buy .price small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); }
.lesson-go {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: var(--display); font-weight: 700; font-size: .86rem; color: var(--lime-700);
}
.lesson-go svg { width: 16px; height: 16px; transition: transform .16s; }
.lesson-card:hover .lesson-go svg { transform: translateX(3px); }

/* ======================================================== step 2 - courts */
.court-filters {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 18px;
}
.court-filters .field { margin: 0; }
.court-filters .filter-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.input-icon { position: relative; }
.input-icon svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}
.input-icon input { padding-left: 40px !important; }

.court-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.court-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: transform .16s, border-color .16s, box-shadow .16s;
}
.court-card:hover { transform: translateY(-3px); border-color: var(--lime-600); box-shadow: var(--shadow); }
.court-card.selected { border-color: var(--lime-600); box-shadow: 0 0 0 3px rgba(166, 214, 8, .22); }
.court-card .thumb { display: block; aspect-ratio: 16 / 10; background: var(--navy-800); overflow: hidden; }
.court-card .thumb img,
.court-card .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.court-card .thumb picture { display: block; height: 100%; }
.court-card .body { display: block; padding: 14px 15px 16px; }
.court-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.court-card h3 { font-size: .97rem; line-height: 1.3; }
.court-card .dist {
  flex: none; font-family: var(--display); font-size: .76rem; font-weight: 700;
  color: var(--navy-600); background: #EEF2F6; border-radius: 100px; padding: 3px 9px;
}
.court-card .where {
  display: flex; align-items: center; gap: 5px;
  font-size: .82rem; color: var(--muted); margin: 6px 0 10px;
}
.court-card .where svg { width: 14px; height: 14px; flex: none; }
.court-card .meta { display: flex; flex-wrap: wrap; gap: 5px; }
.court-card .meta .chip { font-size: .7rem; padding: 3px 8px; }
.court-card .tick {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--lime); color: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
}
.court-card .tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.court-card.js-hidden { display: none; }

.empty-filter {
  text-align: center; color: var(--muted); font-size: .92rem;
  padding: 34px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty-filter svg { width: 30px; height: 30px; color: var(--line-2); margin: 0 auto 10px; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--lime-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}

/* ========================================================== step 3 - time */
.time-cols { display: grid; gap: 18px; align-items: start; }
.cal {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 14px; box-shadow: var(--shadow-sm);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-head h2 { font-size: 1.12rem; letter-spacing: -.01em; }
.cal-nav {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); background: var(--white); color: var(--ink);
  text-decoration: none; transition: all .15s; cursor: pointer;
}
.cal-nav:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.cal-nav svg { width: 17px; height: 17px; }
.cal-nav.is-off { opacity: .25; pointer-events: none; }

.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow {
  margin-bottom: 6px; text-align: center;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.cal-day {
  /* Square cells, but capped: in a full-width card an unbounded 1:1 cell grows
     to 100px a side and pushes the times themselves off the screen. */
  position: relative; aspect-ratio: 1 / 1; min-height: 42px; max-height: 56px; border-radius: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--display); text-decoration: none;
  border: 1.5px solid transparent; transition: all .14s;
}
.cal-day b { font-size: .93rem; font-weight: 600; line-height: 1; }
.cal-day .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime-600); }
.cal-day.is-blank { pointer-events: none; }
.cal-day.is-off { color: var(--line-2); cursor: default; }
.cal-day.is-off b { font-weight: 500; }
.cal-day.is-open { color: var(--ink); background: var(--paper); border-color: var(--line); cursor: pointer; }
.cal-day.is-open:hover { border-color: var(--lime-600); background: var(--lime-50); transform: translateY(-1px); }
.cal-day.is-today::after {
  content: ""; position: absolute; inset: auto 0 4px; margin: 0 auto;
  width: 14px; height: 2px; border-radius: 2px; background: var(--navy-600); opacity: .35;
}
.cal-day.is-sel,
.cal-day.is-sel:hover {
  background: var(--navy-900); border-color: var(--navy-900); color: #fff;
  box-shadow: 0 6px 14px -6px rgba(1, 29, 58, .5);
}
.cal-day.is-sel .dot { background: var(--lime); }
.cal-day.is-sel.is-today::after { background: var(--lime); opacity: .8; }

.cal-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime-600); }
.cal-legend .dot-off { background: var(--line-2); }
.cal-legend .tiny { margin-left: auto; }

/* the day's times */
.times {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 18px; box-shadow: var(--shadow-sm);
}
.times-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.times-head h2 { font-size: 1.1rem; }
.times-head span { font-size: .82rem; color: var(--muted); }
.time-band { margin-bottom: 20px; }
.time-band:last-child { margin-bottom: 0; }
.time-band h3 {
  display: flex; align-items: center; gap: 7px; margin-bottom: 10px;
  font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.time-band h3 svg { width: 14px; height: 14px; color: var(--lime-700); }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.time-btn {
  display: block; text-align: center; padding: 11px 8px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--white); text-decoration: none; transition: all .14s;
}
.time-btn b { display: block; font-family: var(--display); font-size: .95rem; font-weight: 700; color: var(--ink); }
.time-btn span { display: block; font-size: .72rem; color: var(--muted); margin-top: 1px; }
.time-btn:hover {
  border-color: var(--navy-900); background: var(--navy-900); transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px rgba(1, 29, 58, .55);
}
.time-btn:hover b { color: #fff; }
.time-btn:hover span { color: var(--lime); }
.time-btn.is-taken {
  background: #F5F7F9; border-color: transparent; border-style: dashed; border-color: var(--line);
  cursor: not-allowed; transform: none; box-shadow: none;
}
.time-btn.is-taken b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.time-btn.is-taken span { color: var(--muted); }
.times-empty { color: var(--muted); font-size: .92rem; padding: 18px 0; }
.times-note {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--muted); line-height: 1.55;
}
.times-note svg { width: 17px; height: 17px; color: var(--lime-700); flex: none; margin-top: 2px; }
.times-note a { color: var(--lime-700); font-weight: 600; }

/* ======================================================= step 4 - details */
.when-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--navy-900); color: #C8D6E4; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px;
}
.when-banner > svg { width: 22px; height: 22px; color: var(--lime); flex: none; }
.when-banner > span { flex: 1; min-width: 190px; }
.when-banner b { display: block; color: #fff; font-family: var(--display); font-size: 1rem; }
.when-banner b + span { font-size: .84rem; color: #8CA3B8; }
.when-banner .btn { flex: none; }

.book-form .field { margin-bottom: 20px; }
.book-form .opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.signed-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px;
}
.signed-card .avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-900); color: var(--lime);
  font-family: var(--display); font-weight: 700; font-size: .95rem;
}
.signed-card .who { flex: 1; min-width: 150px; }
.signed-card .who b { display: block; font-family: var(--display); color: var(--ink); }
.signed-card .who span { font-size: .84rem; color: var(--muted); }

.flex-check {
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer;
  background: var(--lime-50); border: 1px solid var(--lime-100); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 24px;
}
.flex-check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--lime-700); }
.flex-check b { display: block; color: #3D4C1D; font-size: .95rem; }
.flex-check > span > span { display: block; font-size: .83rem; color: #4E5F2A; margin-top: 3px; line-height: 1.5; }

.submit-row { margin-top: 6px; }
.submit-note {
  display: flex; gap: 10px; align-items: flex-start; justify-content: center;
  margin-top: 14px; font-size: .82rem; color: var(--muted); line-height: 1.5;
}
.submit-note svg { width: 16px; height: 16px; color: var(--lime-700); flex: none; margin-top: 2px; }

/* ---------------------------------------------------------- summary rail */
.book-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.book-rail .summary-card { position: static; }
.summary-row { align-items: flex-start; }
.summary-row .k { flex: none; }
.summary-row .v .sub { display: block; font-weight: 400; color: #8CA3B8; font-size: .82rem; margin-top: 2px; }
.summary-row.pending .v { color: #7C93A9; font-weight: 500; font-style: italic; }
.summary-row .chg {
  display: inline-block; margin-left: 6px; font-size: .74rem; color: var(--lime);
  text-decoration: underline; text-underline-offset: 2px;
}
.summary-row .chg:hover { color: #fff; }
.rail-note { font-size: .76rem; color: #8CA3B8; margin-top: 12px; }
.rail-trust { list-style: none; display: flex; flex-direction: column; gap: 11px; padding: 0 4px; }
.rail-trust li { display: flex; gap: 10px; align-items: flex-start; font-size: .83rem; color: var(--body); line-height: 1.45; }
.rail-trust svg { width: 17px; height: 17px; color: var(--lime-700); flex: none; margin-top: 1px; }
.rail-trust a { color: var(--lime-700); font-weight: 600; }

/* ------------------------------------------------------------ confirmation */
.next-steps { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.next-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.next-steps li + li { border-top: 1px solid var(--line); }
.next-steps .n {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #EEF2F6; color: var(--muted);
  font-family: var(--display); font-weight: 700; font-size: .84rem;
}
.next-steps .n svg { width: 16px; height: 16px; stroke-width: 2.6; }
.next-steps li.done .n { background: var(--lime); color: var(--navy-900); }
.next-steps li.now .n { background: var(--navy-900); color: var(--lime); box-shadow: 0 0 0 4px rgba(1, 29, 58, .08); }
.next-steps b { font-family: var(--display); color: var(--ink); }
.pw-card { border-color: var(--lime-100); background: var(--lime-50); }
.pw-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pw-form .field { margin: 0; flex: 1; min-width: 220px; }

.court-hint {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--cream-50); border: 1px solid var(--cream); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 16px; font-size: .89rem; color: var(--body); line-height: 1.5;
}
.court-hint svg { width: 18px; height: 18px; color: #A07B18; flex: none; margin-top: 2px; }
.court-hint b { color: var(--ink); }
.court-hint a { color: var(--lime-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.signin-nudge {
  display: flex; gap: 10px; align-items: center;
  background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 20px; font-size: .88rem; color: var(--body);
}
.signin-nudge svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.signin-nudge a { color: var(--lime-700); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.submit-total {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-top: 14px; font-size: .86rem; color: var(--muted);
}
.submit-total span:first-child {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink);
}

/* ---------------------------------------------------------------- shared */
.btn.btn-ghost { border-color: transparent; background: transparent; color: var(--body); }
.btn.btn-ghost:hover { background: #EEF2F6; color: var(--ink); }
.mb-12 { margin-bottom: 12px; }

/* ----------------------------------------------------------- responsive */
@media (min-width: 981px) {
  .time-cols { grid-template-columns: 322px minmax(0, 1fr); }
  /* The calendar stays put while a long list of times scrolls past it, so the
     day you are looking at is always on screen. */
  .cal { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (max-width: 1100px) {
  .court-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 980px) {
  .book-rail { position: static; }
  /* On a phone the summary belongs under the choices, not above them. */
  .book-layout > aside { order: 2; }
  .court-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 760px) {
  .assure-row { grid-template-columns: 1fr; }
  .lesson-card { grid-template-columns: 46px 1fr; gap: 8px 14px; padding: 20px 18px; }
  .lesson-icon { width: 46px; height: 46px; border-radius: 13px; }
  .lesson-icon svg { width: 22px; height: 22px; }
  .lesson-buy {
    grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); min-width: 0;
  }
  .lesson-buy .price { font-size: 1.3rem; }
  .lesson-buy .price small { display: inline; }
  .court-filters { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  /* The inner-step hero was half the screen, which pushed the first thing you
     can tap below the fold on every step. Mid-flow the headline has done its
     job; the choices matter more than the prose. */
  .book-head { padding: 24px 0 26px; }
  .book-head h1 { font-size: 1.7rem; }
  .book-head p { font-size: .9rem; }
  .book-head .crumbs { margin-bottom: 10px; }
  /* Three separate cards cost ~200px before the first thing you can tap. One
     card with three rows says the same and costs half that. */
  .assure-row {
    gap: 0; margin-bottom: 18px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .assure-row li {
    padding: 9px 14px; font-size: .82rem; line-height: 1.45;
    background: none; border: 0; border-radius: 0;
  }
  .assure-row li + li { border-top: 1px solid var(--line); }
  .assure-row svg { width: 17px; height: 17px; }
  .book-steps { padding: 10px 12px; gap: 5px; }
  /* components.css hides every label on a narrow screen; keeping the current
     one is what tells somebody mid-flow where they actually are. */
  .book-step.current span.lbl { display: inline; font-size: .82rem; }
  .cal { padding: 14px 12px 12px; }
  .cal-dow, .cal-grid { gap: 4px; }
  /* 44px is the smallest a finger reliably hits; an aspect-ratio cell in a
     narrow column was landing at 43.4. */
  .cal-day { min-height: 44px; border-radius: 9px; }
  .cal-day b { font-size: .88rem; }
  .times { padding: 16px 14px 14px; }
  .time-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .time-btn { padding: 10px 4px; }
  .when-banner { padding: 14px; }
  .when-banner .btn { width: 100%; }
}
@media (max-width: 380px) {
  .cal-day { min-height: 44px; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lesson-card, .court-card, .cal-day, .time-btn { transition: none; }
  .lesson-card:hover, .court-card:hover, .cal-day.is-open:hover, .time-btn:hover { transform: none; }
}
