/* The booking page: shown on its own (book.scubahub.cc/<dive center>) or
   inside a dive center's website. Quiet and neutral, so it sits well in any
   site; the Scuba Hub teal marks what can be chosen. */
:root {
  --ink: #0A2540; --muted: #4A6275; --line: #D3E3E8; --soft: #F3FAFB;
  --teal: #0E7490; --teal-dark: #0B5F76; --tint: #E3F4F7; --warn: #8A4B00; --warn-bg: #FBEBD3;
  --bad: #9B2C2C; --bad-bg: #FBE4E4; --radius: 14px;
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: #fff; }
/* Inside a website the page's own background shows through. */
html.framed, html.framed body { background: transparent; }
html.alone, html.alone body { background: var(--soft); min-height: 100%; }
.app { max-width: 720px; margin: 0 auto; padding: 20px 16px 28px; }
html.alone .app { padding-top: 32px; }
/* Inside a website the form lines up with the page around it. */
html.framed .app { margin: 0; padding: 4px 2px 12px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
p { margin: 0; }
a { color: var(--teal); }
.where { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.top { margin-bottom: 20px; }
.loading, .note { color: var(--muted); }
.note { font-size: .88rem; }
.steps { display: flex; gap: 8px; margin: 18px 0 20px; padding: 0; list-style: none; font-size: .82rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--line); }
.steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-weight: 600; font-size: .75rem; }
.steps .on { color: var(--ink); font-weight: 600; }
.steps .on b { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps .done b { background: var(--tint); border-color: var(--tint); color: var(--teal-dark); }

/* Services */
.list { display: grid; gap: 10px; }
.card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--teal); box-shadow: 0 6px 18px -12px rgba(10, 37, 64, .5); }
.card .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card .name { font-weight: 600; }
.card .price { font-weight: 600; white-space: nowrap; }
.card .meta { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.card .desc { color: var(--ink); font-size: .9rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Days and times: a calendar, and the times of the chosen day beside it. */
.when { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 600px) { .when { grid-template-columns: 1fr; gap: 18px; } }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calhead b { font-size: .95rem; }
.nav { font: inherit; font-size: 1.3rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.nav:disabled { opacity: .35; cursor: default; }
.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk { margin-bottom: 4px; }
.wk span { text-align: center; font-size: .72rem; color: var(--muted); }
.cell { aspect-ratio: 1; min-width: 0; width: 100%; }
.day { font: inherit; font-size: .9rem; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #9AAFBB; cursor: default; position: relative; }
.day.open { background: var(--tint); color: var(--ink); font-weight: 600; cursor: pointer; }
.day.open:hover { background: #CDEBF0; }
.day.full { text-decoration: line-through; }
.day.chosen, .day.chosen:hover { background: var(--ink); color: #fff; }
.picked { display: grid; gap: 12px; align-content: start; }
.picked .btn { justify-self: start; }
.pday { font-weight: 600; }
.times { display: flex; flex-wrap: wrap; gap: 8px; }
.time { font: inherit; display: grid; gap: 0; justify-items: start; min-width: 108px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; }
.time b { font-size: .95rem; }
.time span { font-size: .78rem; color: var(--muted); }
.time:hover:not(:disabled) { border-color: var(--teal); }
.time:disabled { cursor: default; opacity: .55; background: var(--soft); }

/* Form */
.chosen { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--tint); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.chosen .what { font-weight: 600; }
.chosen .when { font-size: .9rem; color: var(--teal-dark); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
label.field { display: grid; gap: 5px; font-size: .88rem; font-weight: 600; }
label.field { align-content: start; }
label.field small { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: -1px; }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #A9C4CE; border-radius: 12px; background: #fff; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, .card:focus-visible { outline: 3px solid rgba(20, 184, 200, .45); outline-offset: 1px; border-color: var(--teal); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.agree input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-weight: 600; }
.total small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.ts { min-height: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; }
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--ink); cursor: pointer; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.plain { background: #fff; color: var(--ink); }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-top: 14px; }
.error[hidden] { display: none; }
.sent { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sent .tick { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--teal-dark); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 12px; }
.sent p + p { margin-top: 10px; }
.foot { margin-top: 22px; font-size: .78rem; color: var(--muted); }
.foot a { color: var(--muted); }
