/* ==========================================================================
   LINEUP SUPPLY: HIRE WAIVER
   Only waiver.html loads this. Tokens and buttons come from styles.css.
   Built for an iPad on the counter: 16px inputs so Safari never zooms, and
   every control at least 44px tall.
   ========================================================================== */

:root { --w-err: #A8321F; }

[hidden] { display: none !important; }

.waiver {
  max-width: 880px; margin-inline: auto;
  display: grid; gap: clamp(1.2rem, 2.6vw, 1.9rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

/* ---------- Sections ---------- */
.w-sec {
  display: grid; gap: 1.3rem;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bone-2);
  padding: clamp(1.3rem, 3vw, 2.2rem);
}
.w-sec--flat { background: transparent; border-style: dashed; }
.w-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; }
.w-head h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.05; flex: 1 1 12rem; }
.w-n { font-family: var(--display); font-weight: 900; font-size: 0.8rem; letter-spacing: 0.14em; color: var(--ink-3); }
.w-who {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.4rem 0.7rem; border-radius: 999px; background: var(--ink); color: var(--bone);
}

/* ---------- Fields ---------- */
.w-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .w-grid { grid-template-columns: 1fr 1fr; }
  .w-full { grid-column: 1 / -1; }
}
.w-field { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.w-field label, .w-label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.w-opt { font-weight: 600; letter-spacing: 0.08em; opacity: 0.75; }
.w-opt::before { content: "("; }
.w-opt::after { content: ")"; }

.w-field input, .w-field select, .w-field textarea {
  width: 100%; border: 0; border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  background: var(--bone); color: var(--ink);
  padding: 0.85rem 1rem; min-height: 50px;
  font: inherit; font-size: 1rem; font-weight: 500;
  -webkit-appearance: none; appearance: none;
}
.w-field select {
  cursor: pointer; padding-right: 2.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
  background-size: 0.35rem 0.35rem; background-repeat: no-repeat;
}
.w-field textarea { min-height: 5.5rem; line-height: 1.5; resize: vertical; }
.w-field input::placeholder, .w-field textarea::placeholder { color: var(--ink-3); opacity: 0.7; }
.w-field input:focus, .w-field select:focus, .w-field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.was-validated .w-field :invalid { box-shadow: inset 0 0 0 2px var(--w-err); }

.w-money { position: relative; }
.w-money::before {
  content: "$"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--ink-3); pointer-events: none;
}
.w-money input { padding-left: 1.9rem; font-variant-numeric: tabular-nums; }

.w-note { font-size: 0.82rem; color: var(--ink-3); line-height: 1.55; }

/* ---------- Agreement text ---------- */
.w-terms p, .w-terms li, .w-guardian p, .w-affirm { font-size: 0.97rem; line-height: 1.62; color: var(--ink-2); max-width: 72ch; }
.w-terms ol, .w-terms ul { display: grid; gap: 0.7rem; padding-left: 1.35rem; }
.w-terms ol { list-style: decimal; }
.w-terms ul { list-style: disc; }
.w-terms li::marker { color: var(--ink-3); font-weight: 700; }
.w-terms strong, .w-affirm strong, .w-guardian strong { color: var(--ink); }
.w-terms .w-warn {
  max-width: none; background: var(--black); color: rgba(242, 237, 228, 0.8);
  padding: clamp(1.1rem, 2.4vw, 1.5rem); border-radius: 4px; font-size: 1.02rem;
}
.w-terms .w-warn strong { color: var(--bone); display: block; margin-bottom: 0.35rem; font-size: 1.12rem; line-height: 1.35; }
.w-terms .w-statutory {
  display: grid; gap: 0.9rem;
  border: 2px solid var(--ink); border-radius: 4px;
  padding: clamp(1.1rem, 2.4vw, 1.5rem); background: var(--bone);
}
.w-terms .w-statutory p, .w-terms .w-statutory li { max-width: none; color: var(--ink); }

.w-table { overflow-x: auto; }
.w-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.w-table th, .w-table td { text-align: left; vertical-align: top; padding: 0.8rem 0.9rem 0.8rem 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.w-table th { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.w-table td:last-child { font-weight: 700; color: var(--ink); width: 42%; }

/* ---------- Tick boxes ---------- */
.w-checks { display: grid; border-top: 1px solid var(--line); }
.w-check {
  display: grid; grid-template-columns: auto 1fr; gap: 0.95rem; align-items: start;
  padding: 0.95rem 0; min-height: 44px; cursor: pointer;
  font-size: 0.97rem; line-height: 1.5; color: var(--ink);
}
.w-checks .w-check { border-bottom: 1px solid var(--line); }
.w-check input {
  -webkit-appearance: none; appearance: none; flex: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 4px; margin-top: -0.1rem;
  background: var(--bone); box-shadow: inset 0 0 0 1.5px var(--ink);
  display: grid; place-content: center;
}
.w-check input::after {
  content: ""; width: 7px; height: 13px; margin-top: -3px;
  border: solid var(--bone); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg); opacity: 0;
}
.w-check input:checked { background: var(--ink); }
.w-check input:checked::after { opacity: 1; }
.was-validated .w-check input:invalid { box-shadow: inset 0 0 0 2px var(--w-err); }

/* ---------- Signature ---------- */
.w-sig-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.w-sig-top .tlink { min-height: 44px; }
.w-sig {
  position: relative; background: #fff; border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.w-sig canvas { display: block; width: 100%; aspect-ratio: 3 / 1; min-height: 150px; touch-action: none; cursor: crosshair; }
.w-sig::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 24%;
  border-bottom: 1.5px dashed var(--bone-3); pointer-events: none;
}
.w-sig-hint {
  position: absolute; left: 6%; bottom: calc(24% + 0.5rem);
  font-size: 0.8rem; color: var(--ink-3); pointer-events: none; transition: opacity 0.2s;
}
.w-sig.has-ink .w-sig-hint { opacity: 0; }
.w-sig.is-missing { box-shadow: inset 0 0 0 2px var(--w-err); }

.w-guardian { display: grid; gap: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }

/* ---------- Submit ---------- */
.w-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.w-status { font-size: 0.95rem; font-weight: 600; line-height: 1.5; color: var(--w-err); }
.w-status:empty { display: none; }
.w-submit { width: 100%; min-height: 60px; font-size: 0.95rem; }
.w-submit[disabled] { opacity: 0.6; pointer-events: none; }

.w-done {
  max-width: 880px; margin: 0 auto clamp(4rem, 8vw, 7rem);
  display: grid; gap: 1.2rem; border-radius: 4px;
  padding: clamp(1.8rem, 5vw, 3.4rem);
}
.w-done:focus { outline: none; }

/* ---------- Square card box ---------- */
.w-card { display: grid; gap: 0.7rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
#card-container { min-height: 92px; }
.w-card.is-missing #card-container { outline: 2px solid var(--w-err); outline-offset: 4px; border-radius: 4px; }
.w-test {
  justify-self: start; font-size: 0.8rem; font-weight: 700;
  padding: 0.5rem 0.8rem; border-radius: 4px; background: var(--amber); color: #fff;
}

/* ---------- Hold page (waiver-hold.php) ---------- */
.w-flash { font-weight: 700; padding: 1rem 1.2rem; border-radius: 4px; background: var(--green); color: #fff; }
.w-flash--err { background: var(--w-err); }
.w-sec form + form { margin-top: -0.4rem; }
