/* Aradiq public booking page — mobile first, no framework. --brand / --on-brand are set from the business's colour. */
:root {
  --brand: #4b2bd6;
  --on-brand: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --text: #1c1d21;
  --muted: #5f6370;
  --line: #e3e4e8;
  --bg: #f6f7f9;
  --card: #fff;
  --danger: #b42318;
  --ok: #067647;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.embed { background: transparent; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

body.embed .wrap { padding-bottom: 8px; }

h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; margin-bottom: 12px; }
p { margin: 0 0 12px; }
a { color: var(--brand); }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Header ---- */
.cover {
  margin: 0 -16px;
  height: 150px;
  background: var(--brand-soft) center / cover no-repeat;
}

.head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0 8px;
}

.cover + .head { margin-top: -36px; }

.logo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 4px;
}

.initial {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 1.6rem;
  padding: 0;
}

.cover + .head h1 { margin-top: 30px; }

.about { color: var(--muted); font-size: 0.95rem; white-space: pre-line; }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }

/* ---- Steps ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.crumbs li { background: var(--brand-soft); border-radius: 999px; padding: 2px 10px; }

.back {
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.95rem;
  padding: 4px 0;
  margin-bottom: 8px;
  cursor: pointer;
}

.options { display: grid; gap: 8px; }

.cat { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 8px 0 0; }

.option {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 56px;
}

.option:hover, .option:focus-visible { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.option .grow { flex: 1; min-width: 0; }
.option .name { font-weight: 600; display: block; }
.option .sub { color: var(--muted); font-size: 0.88rem; display: block; }
.option .price { font-weight: 600; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* ---- Dates + times ---- */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 10px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
}

.day {
  flex: none;
  width: 58px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 0;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.day b { display: block; font-size: 1.15rem; }
.day small { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; }
.day[disabled] { opacity: 0.4; cursor: default; }
.day.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.day.on small { color: inherit; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }

.time {
  border: 1px solid var(--brand);
  color: var(--brand);
  background: #fff;
  border-radius: 8px;
  padding: 10px 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.time:hover, .time:focus-visible { background: var(--brand); color: var(--on-brand); outline: none; }

.note { font-size: 0.85rem; color: var(--muted); }
.empty { color: var(--muted); padding: 8px 0; }

/* ---- Form ---- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 12px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); }

input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  padding: 11px 12px;
  border: 1px solid #c9ccd3;
  border-radius: 8px;
  background: #fff;
  color: inherit;
}

input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 70px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row label { margin-top: 12px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.policies {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: pre-line;
  margin-top: 14px;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn[disabled] { opacity: 0.6; cursor: wait; }

.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btns { display: grid; gap: 8px; margin-top: 16px; }
.btns .btn { margin-top: 0; }

.error {
  color: var(--danger);
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 0.93rem;
}

.ok { color: var(--ok); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }

.summary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.95rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }

.small { font-size: 0.85rem; color: var(--muted); }
.foot { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: 24px; }
.foot a { color: inherit; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Cookie choice (only when the business set ad / analytics tags). */
.deposit-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand, #0d6efd);
  border-radius: 8px;
  display: grid;
  gap: 4px;
}
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center;
  font-size: 0.88rem;
}
.consent p { margin: 0; max-width: 560px; flex: 1 1 260px; }
.consent-btns { display: flex; gap: 8px; }
.consent-btns .btn { margin: 0; width: auto; padding: 9px 18px; }

.loading { display: grid; place-items: center; min-height: 60vh; }

.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

@media (min-width: 600px) {
  .wrap { padding-top: 24px; }
  .cover { margin: 0; border-radius: var(--radius); height: 190px; }
}
