/* ==========================================================================
   YourTeeSheet — product stylesheet
   Seeded from the demo's base.css and extended; the demo keeps its own copy.
   Design rules: black on white, heavy borders, large type, no gradients,
   no decorative color. Color is used only to carry meaning (open / booked /
   checked in / blocked), and every one of those states is also labelled in
   words so the sheet still reads correctly in black and white or when printed.
   ========================================================================== */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #444;
  --line: #000;
  --hairline: #bbb;
  --fill: #eeeeee;
  --fill-strong: #dcdcdc;
  --good: #10621f;   /* confirmed / open  */
  --warn: #8a5a00;   /* partially filled  */
  --stop: #a11212;   /* blocked / cancel  */
  --focus: #0b4fd6;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.wrap--wide { max-width: 1320px; }

/* ---------- Type ---------- */

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: 2.3rem; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

.lede { font-size: 1.15rem; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--fill); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--paper);
  border: 3px solid var(--ink);
}

/* ---------- Page header ---------- */

.masthead {
  border-bottom: 4px solid var(--line);
  margin-bottom: 1.75rem;
  padding: 1.5rem 0 1.25rem;
}
.masthead .wrap { padding-bottom: 0; }
.masthead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.masthead__name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.masthead__sub { font-size: 1rem; color: var(--muted); }

.demo-bar {
  background: var(--ink);
  color: var(--paper);
  font-size: .95rem;
  padding: .55rem 0;
}
.demo-bar .wrap {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  justify-content: space-between;
  align-items: center;
}
.demo-bar a { color: var(--paper); }
.demo-bar a:hover { background: #333; }
.demo-bar strong { text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Panels ---------- */

.panel {
  border: 3px solid var(--line);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--paper);
}
.panel__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.panel--flat { border-width: 2px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  padding: .7rem 1.15rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--fill); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #333; }
.btn--small { padding: .4rem .7rem; font-size: .9rem; border-width: 2px; }
.btn--danger { border-color: var(--stop); color: var(--stop); }
.btn--danger:hover { background: #fbeaea; }
.btn[disabled] {
  cursor: not-allowed;
  opacity: .45;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* ---------- Form controls ---------- */

label { font-weight: 700; display: block; margin-bottom: .3rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="time"],
input[type="date"],
select,
textarea {
  font: inherit;
  width: 100%;
  padding: .6rem .7rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
textarea { min-height: 4.5rem; resize: vertical; }

.field { margin-bottom: 1rem; }
.field__hint { font-weight: 400; color: var(--muted); font-size: .9rem; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Segmented choice: a row of big, obvious toggle buttons. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.choice {
  position: relative;
  display: inline-flex;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: inline-block;
  padding: .6rem 1rem;
  border: 3px solid var(--ink);
  font-weight: 700;
  background: var(--paper);
  min-width: 3.2rem;
  text-align: center;
}
.choice input:checked + span { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:hover + span { background: var(--fill); }
.choice input:checked:hover + span { background: #333; }

/* ---------- Tee time list (customer page) ---------- */

.times {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.time-card {
  background: var(--fill);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.time-card__time { font-size: 1.5rem; font-weight: 800; }
.time-card__meta { font-size: .95rem; color: var(--muted); }
.time-card__price { font-size: 1.25rem; font-weight: 800; }
.time-card__right { text-align: right; }

.empty-note {
  border: 3px dashed var(--ink);
  padding: 1.25rem;
  font-weight: 700;
}

/* ---------- Summary / receipt lines ---------- */

.lines { border-top: 2px solid var(--hairline); margin-top: .5rem; }
.line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 2px solid var(--hairline);
}
.line--total {
  font-size: 1.25rem;
  font-weight: 800;
  border-bottom: 4px solid var(--ink);
}

.confirm-code {
  display: inline-block;
  border: 4px solid var(--ink);
  padding: .5rem 1rem;
  font-size: 1.6rem;
  font-weight: 800;
}

/* ---------- Status badges ---------- */

.badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .15rem .5rem;
  border: 2px solid var(--ink);
  white-space: nowrap;
}
.badge--open { border-color: var(--good); color: var(--good); }
.badge--partial { border-color: var(--warn); color: var(--warn); }
.badge--full { background: var(--ink); color: var(--paper); }
.badge--in { background: var(--good); color: var(--paper); border-color: var(--good); }
.badge--blocked { background: var(--stop); color: var(--paper); border-color: var(--stop); }

/* ---------- Tee sheet table ---------- */

.sheet-wrap { border: 3px solid var(--line); overflow-x: auto; }

table.sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
table.sheet th,
table.sheet td {
  border-bottom: 2px solid var(--hairline);
  border-right: 2px solid var(--hairline);
  padding: .5rem .6rem;
  text-align: left;
  vertical-align: top;
}
table.sheet th {
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  position: sticky;
  top: 0;
  border-bottom: 3px solid var(--ink);
}
table.sheet td:last-child,
table.sheet th:last-child { border-right: 0; }

td.col-time {
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
}
tr.row--hour td { border-top: 3px solid var(--ink); }
tr.row--blocked { background: var(--fill); }
tr.row--full { background: var(--fill); }

/* Player spots: every tee time renders as the same four-column strip — one
   chip per group spanning its party size, a dashed chip for whatever is
   still open — so all rows are the same height regardless of bookings. */
.spots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
  min-width: 26rem;
}
.spot {
  display: block;
  font: inherit;
  text-align: left;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: .25rem .5rem;
  min-width: 0;
  overflow: hidden;
}
.spot--group { cursor: pointer; }
.spot--group:hover { background: var(--fill); }

/* Checked-in groups sit dimmed — they're dealt with, mostly behind you. */
.spot--checked { border-color: var(--hairline); background: var(--fill); color: var(--muted); }
.spot--checked:hover { background: var(--fill-strong); }

/* Open space is green, so a glance finds what's still sellable. */
.spot--open {
  border: 2px dashed var(--good);
  color: var(--good);
  background: #eaf4ec;
  cursor: pointer;
}
.spot--open:hover { background: #d8ecdc; }
.spot--open .spot__meta { color: inherit; }

/* On past days, unbooked space is history, not opportunity — no green. */
.spot--past, .spot--past:hover {
  background: var(--paper);
  border-color: var(--hairline);
  color: var(--muted);
  cursor: default;
}
.spot--past .spot__meta { color: var(--muted); }
.spot--blocked {
  border-color: var(--stop);
  color: var(--stop);
  background: #fbeaea;
}
.spot__name {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spot__meta {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spot--blocked .spot__meta { color: inherit; }
.spot__in { color: var(--muted); }

/* Legend swatches: little copies of the spots themselves. */
.swatch {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: .1rem .55rem;
  font-weight: 700;
  font-size: .85rem;
}
.swatch--open { border-style: dashed; border-color: var(--good); color: var(--good); background: #eaf4ec; }
.swatch--in { border-color: var(--hairline); background: var(--fill); color: var(--muted); }
.swatch--blocked { border-color: var(--stop); color: var(--stop); background: #fbeaea; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  font-size: .9rem;
  margin: .75rem 0 0;
  align-items: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
/* Arrows either side of the date; the date itself is a native
   date input stretched invisibly over its label, so clicking it opens the
   browser's calendar. */
.date-nav__arrow { padding: .5rem .85rem; font-size: 1.1rem; line-height: 1.25; }
.date-nav__pick {
  position: relative;
  display: inline-block;
  min-width: 11rem;
  padding: .45rem 1rem;
  border: 3px solid var(--ink);
  text-align: center;
  cursor: pointer;
  line-height: 1.25;
}
.date-nav__pick:hover { background: var(--fill); }
.date-nav__pick:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.date-nav__pick b { display: block; font-size: 1.15rem; }
.date-nav__pick small { display: block; font-weight: 600; font-size: .85rem; color: var(--muted); }
.date-nav__pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---------- Dialog ---------- */

dialog {
  border: 4px solid var(--ink);
  padding: 0;
  width: min(560px, 94vw);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dialog__head {
  background: var(--ink);
  color: var(--paper);
  padding: .8rem 1.1rem;
  font-size: 1.2rem;
  font-weight: 800;
}
.dialog__body { padding: 1.1rem; }
.dialog__foot {
  padding: 0 1.1rem 1.1rem;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

[hidden] { display: none !important; }

.error {
  border: 3px solid var(--stop);
  color: var(--stop);
  font-weight: 700;
  padding: .6rem .8rem;
  margin-bottom: 1rem;
}

.hr { border: 0; border-top: 3px solid var(--ink); margin: 2rem 0; }

/* ---------- Home / index cards ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  border: 3px solid var(--ink);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.card h2 { margin-bottom: .35rem; }
.card__tag {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card ul { margin: 0 0 1.25rem 1.1rem; padding: 0; }
.card li { margin-bottom: .35rem; }
.card .btn { margin-top: auto; }

/* ---------- Print (pro shop prints the sheet every morning) ---------- */

@media print {
  html { font-size: 12pt; }
  .demo-bar,
  .toolbar,
  .no-print,
  .actions,
  th.col-actions,
  td.col-actions { display: none !important; }
  .panel, .sheet-wrap { border-width: 2px; }
  table.sheet th { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .badge, .swatch { border-color: #000 !important; color: #000 !important; background: #fff !important; }
  .spot { border-color: #000 !important; color: #000 !important; background: #fff !important; }
  .spot__meta, .spot__in { color: #000 !important; }
  a { text-decoration: none; }
  tr { break-inside: avoid; }
}

@media (max-width: 640px) {
  html { font-size: 17px; }
  h1 { font-size: 1.85rem; }
  .time-card { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .time-card__right { text-align: left; }
}

/* ==========================================================================
   Everything below is YourTeeSheet product UI (landing, auth, wizard, app).
   ========================================================================== */

/* ---------- Site header + footer (landing) ---------- */

.site-header {
  border-bottom: 4px solid var(--line);
  padding: 1rem 0;
}
.site-header .wrap {
  padding-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.wordmark {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
}
.wordmark:hover { background: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 4px solid var(--line);
  margin-top: 3.5rem;
  padding: 1.5rem 0 0;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-bottom: 2.5rem;
}

/* ---------- Landing sections ---------- */

.hero { padding: 2.5rem 0 .5rem; }
.hero h1 { font-size: 3rem; max-width: 16ch; }
.hero .lede { font-size: 1.3rem; }
.hero .btn-row { margin: 1.5rem 0 .75rem; align-items: center; gap: 1rem 1.5rem; }
.hero .btn { font-size: 1.15rem; padding: .9rem 1.5rem; }

.free-panel {
  border: 4px solid var(--ink);
  padding: 1.5rem;
  margin: 2.25rem 0;
}
.free-panel h2 { font-size: 1.9rem; margin-bottom: .75rem; }
.free-panel p { font-size: 1.1rem; max-width: 68ch; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.step { border: 3px solid var(--ink); padding: 1.1rem 1.25rem; }
.step__num { font-size: 2rem; font-weight: 800; display: block; }

.shot-frame {
  border: 4px solid var(--ink);
  overflow: hidden;
  margin: .5rem 0 .6rem;
}
.shot-frame img { display: block; width: 100%; }

.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: 2.25rem 1.5rem;
  text-align: center;
  margin: 2.5rem 0 0;
}
.cta-band h2 { font-size: 1.9rem; }
.cta-band .btn { border-color: var(--paper); background: var(--ink); color: var(--paper); }
.cta-band .btn:hover { background: #333; }
.cta-band .btn--primary { background: var(--paper); color: var(--ink); }
.cta-band .btn--primary:hover { background: var(--fill-strong); }
.cta-band a { color: var(--paper); }
.cta-band a:hover { background: #333; }
.cta-band .btn-row { justify-content: center; margin-top: 1.25rem; align-items: center; gap: 1rem 1.5rem; }

/* ---------- Auth + wizard shells ---------- */

.shell-narrow { max-width: 32rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.shell-mid { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.big-card { border: 4px solid var(--ink); padding: 1.5rem; background: var(--paper); }
.big-card h1 { font-size: 1.8rem; }

.kicker {
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .4rem;
}

.btn--block { display: block; width: 100%; }

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.auth-links { margin-top: 1.25rem; }
.auth-links p { margin-bottom: .4rem; }

/* ---------- Rate grid (setup wizard) ---------- */

.rate-grid-wrap { overflow-x: auto; }
table.rate-grid { border-collapse: collapse; width: 100%; }
.rate-grid th,
.rate-grid td {
  border: 2px solid var(--hairline);
  padding: .5rem .6rem;
  text-align: left;
  vertical-align: middle;
}
.rate-grid thead th {
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-color: var(--ink);
}
.rate-grid .rate-grid__row {
  font-weight: 800;
  white-space: nowrap;
}
.money {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-weight: 700;
}
.money input { width: 4.6rem; padding: .45rem .5rem; }

/* ---------- Notices (offline, info) ---------- */

.notice {
  border: 3px solid var(--warn);
  color: var(--warn);
  font-weight: 700;
  padding: .6rem .8rem;
  margin-bottom: 1rem;
}

/* ---------- Tee sheet on tablets ---------- */

@media (max-width: 960px) {
  .spots { min-width: 19rem; }
  table.sheet { font-size: .9rem; }
}
@media (pointer: coarse) {
  .spot { min-height: 2.6rem; }
  .btn--small { padding: .55rem .85rem; }
}

/* ---------- Back-nine layout ---------- */

/* Wide screens: one row per time, a labelled strip per tee.
   Under 1100px the two-strip table hides and the single-tee table plus the
   Front/Back toggle take over. */
.bn-narrow { display: none !important; }
@media (max-width: 1099px) {
  .bn-wide { display: none !important; }
  .bn-narrow { display: revert !important; }
}

.tee-cell { min-width: 19rem; }
.tee-cell .spots { min-width: 0; }

/* The toggled single-tee view names the tee right under the time. */
.col-time__tee {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A blocked chip is clickable (to unblock) on days that aren't over. */
button.spot--blocked { cursor: pointer; }
button.spot--blocked:hover { background: #f5d9d9; }

/* Still used by the static mockup pages. */
.tee-cell__fees { margin-left: auto; font-weight: 700; white-space: nowrap; }
.tee-cell__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.tee-tag {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: .1rem .4rem;
}

/* ---------- Tour overlay ---------- */

.tour-spot {
  position: fixed;
  z-index: 60;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.tour-card {
  position: fixed;
  z-index: 61;
  width: min(430px, 92vw);
  border: 4px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.tour-card--center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.tour-card__head {
  background: var(--ink);
  color: var(--paper);
  padding: .7rem 1.1rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.tour-card__body { padding: 1rem 1.1rem; }
.tour-card__body p { margin-bottom: 0; }
.tour-card__foot {
  padding: .25rem 1.1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
}
.tour-card__foot .btn-row { gap: .5rem; }
.tour-step {
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.tour-skip {
  font-size: .9rem;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  color: var(--ink);
}
.tour-skip:hover { background: var(--fill); }
