/* The Debt Clinic booking page. Tokens copied from the website redesign
   (site/index.html :root) so the embedded page reads as part of the site. */
:root {
  --bg: #f3f6fb;
  --paper: #ffffff;
  --ink: #0a1733;
  --ink-2: #46526b;
  --muted: #8792a8;
  --line: rgba(10, 29, 58, .1);
  --accent-2: #b9d2ff;
  --deep: #0a1d3a;
  --deep-2: #173a6b;
  --ok: #1f7a4d;
  --ok-bg: #e8f5ee;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --r: 22px;
  --r-sm: 14px;
  --focus: 0 0 0 3px rgba(23, 58, 107, .25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.embed { background: transparent; }
body.embed .top, body.embed .foot { display: none; }

.top { max-width: 640px; margin: 0 auto; padding: 20px 16px 0; }
.brand { font: 600 1.05rem "Inter Tight", Inter, sans-serif; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.shell { max-width: 640px; margin: 0 auto; padding: 16px; }
body.embed .shell { max-width: none; padding: 0; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; margin: 16px 0 8px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(10, 23, 51, .06);
}
body.embed .card { border: 0; border-radius: 0; box-shadow: none; padding: 24px 20px 28px; }
@media (min-width: 560px) { .card { padding: 34px 36px; } body.embed .card { padding: 28px 40px 34px; } }

.test-banner {
  background: var(--warn-bg); color: var(--warn); border: 1px solid #f1d9a6;
  border-radius: var(--r-sm); padding: 10px 14px; font-size: .88rem; margin-bottom: 12px;
}
body.embed .test-banner { margin: 12px 20px 0; }

.kicker { font: italic 400 .95rem Fraunces, Georgia, serif; color: var(--ink-2); margin: 0 0 4px; }
h1, h2 { font-family: "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.15; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: .92rem; margin: 6px 0 18px; }
.meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); margin-right: 8px; vertical-align: middle; }

.steps { display: flex; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps li.on { background: var(--deep-2); }

label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
.req { color: var(--bad); margin-left: 2px; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid rgba(10, 29, 58, .18); border-radius: var(--r-sm);
  padding: 13px 14px; min-height: 50px; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, .day:focus-visible, .slot:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--deep-2); }
.row { display: grid; gap: 0 12px; }
@media (min-width: 480px) { .row.two { grid-template-columns: 1fr 1fr; } }
.code-input { font: 600 1.6rem/1 "Inter Tight", Inter, sans-serif; letter-spacing: .4em; text-align: center; }

.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .95rem; margin: 0;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--deep-2); }
.check:has(input:checked) { border-color: var(--deep-2); background: #f5f8ff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 15px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .98rem Inter, sans-serif; text-decoration: none; transition: opacity .15s, transform .15s;
}
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid rgba(10, 29, 58, .18); }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid rgba(179, 38, 30, .35); }
.btn-block { width: 100%; margin-top: 20px; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 480px) { .actions.three { grid-template-columns: 1fr 1fr 1fr; } .actions.two { grid-template-columns: 1fr 1fr; } }
.link { background: none; border: 0; padding: 0; color: var(--deep-2); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: .92rem; }

.alert { border-radius: var(--r-sm); padding: 12px 14px; font-size: .92rem; margin: 14px 0 0; }
.alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.field-error { color: var(--bad); font-size: .85rem; margin: 6px 0 0; }

.appt { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; background: #fafcff; margin: 14px 0 0; }
.appt .when { font: 600 1.15rem "Inter Tight", Inter, sans-serif; margin: 0 0 2px; }
.appt .who { color: var(--ink-2); margin: 0; }

/* calendar */
.tzrow { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; font-size: .9rem; color: var(--ink-2); }
.tzrow select { width: auto; min-height: 40px; padding: 8px 34px 8px 12px; font-size: .9rem; background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font: 600 1.05rem "Inter Tight", Inter, sans-serif; }
.nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.nav[disabled] { opacity: .35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; font-weight: 600; }
.day { aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font: 500 .95rem Inter, sans-serif; color: var(--muted); cursor: default; max-width: 48px; margin: 0 auto; width: 100%; }
.day.open { color: var(--ink); background: #eef3ff; cursor: pointer; font-weight: 600; }
.day.open:hover { background: #dfe8ff; }
.day.sel { background: var(--ink); color: #fff; }
.day.today { box-shadow: inset 0 0 0 1px var(--deep-2); }
.slots-title { font-weight: 600; margin: 20px 0 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot { min-height: 46px; border-radius: 12px; border: 1px solid rgba(10, 29, 58, .18); background: #fff; font: 600 .95rem Inter, sans-serif; color: var(--ink); cursor: pointer; }
.slot:hover { border-color: var(--deep-2); background: #f5f8ff; }
.empty { color: var(--ink-2); background: #fafcff; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 16px; text-align: center; margin-top: 14px; }

.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px; background: #fafcff; margin: 4px 0 6px; font-size: .95rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font-size: 1.6rem; margin-bottom: 14px; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: s .7s linear infinite; }
.btn-light .spin, .btn-danger .spin { border-color: rgba(10, 23, 51, .2); border-top-color: var(--ink); }
@keyframes s { to { transform: rotate(360deg); } }
.testbox { margin-top: 18px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: .85rem; word-break: break-all; }
.testbox a { color: inherit; }

/* links inside the card (consent links, test boxes) */
#app a:not(.btn) { color: var(--deep-2); }   /* a link styled as a button keeps its own colour */
