:root {
  --blue: #1e3fa8;
  --blue-dark: #14276b;
  --orange: #f28c1e;
  --orange-dark: #d9770c;
  --ink: #1a1d24;
  --muted: #5b6270;
  --bg: #ffffff;
  --bg-alt: #f2f5fb;
  --line: #e3e8f2;
  --max: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  /* Room for the pinned total bar so it never covers the submit button. */
  padding-bottom: 6rem;
}

.site-header { text-align: center; padding: 1.5rem 1rem 0.5rem; }
.logo { max-width: 240px; height: auto; }
.strap { color: var(--muted); margin: 0.25rem 0 0; font-size: 0.95rem; }

main { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

.intro { background: var(--bg-alt); border-radius: 12px; padding: 1.25rem; margin: 1rem 0 1.5rem; }
.intro h1 { margin: 0 0 0.75rem; font-size: 1.5rem; color: var(--blue-dark); }
.steps { margin: 0.75rem 0; padding-left: 1.1rem; }
.steps li { margin-bottom: 0.5rem; }
.covers { margin: 0.75rem 0 0; font-weight: 600; }

.block { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; }
legend { font-weight: 700; color: var(--blue); padding: 0 0.4rem; }

.question { margin-bottom: 1.1rem; }
.question > label, .question .label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

/* The reuse-hob/sink/tap group is a <fieldset>/<legend> for screen readers
   (see index.html), not a styling choice — undo the browser defaults so it
   looks exactly like the plain .question div it replaced. */
.reuse-group { border: 0; margin: 0 0 1.1rem; padding: 0; min-width: 0; }
.reuse-group legend { display: block; padding: 0; color: inherit; font-weight: 600; margin-bottom: 0.35rem; }
.question.checkbox > label { font-weight: 400; display: flex; gap: 0.5rem; align-items: flex-start; }
.opt { font-weight: 400; color: var(--muted); }

select, input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  padding: 0.7rem;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
select:focus, input:focus, textarea:focus { outline: 3px solid rgba(30,63,168,0.35); border-color: var(--blue); }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; flex: none; }

.help { font-size: 0.9rem; color: var(--muted); margin: 0.35rem 0 0; }
.help.important { color: var(--ink); font-weight: 600; }

.notice {
  background: #fff6e8;
  border-left: 4px solid var(--orange);
  padding: 0.7rem 0.9rem;
  border-radius: 0 8px 8px 0;
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.disabled-option { opacity: 0.55; }

.disclaimer {
  border: 2px solid var(--orange);
  border-radius: 12px;
  background: #fff9f0;
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.btn-primary {
  display: block; width: 100%;
  padding: 1rem; font: inherit; font-weight: 700; font-size: 1.05rem;
  color: #fff; background: var(--orange);
  border: 0; border-radius: 10px; cursor: pointer;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { background: var(--muted); cursor: progress; }

.btn-secondary {
  display: inline-block; padding: 0.8rem 1.2rem;
  font: inherit; font-weight: 700;
  color: var(--blue); background: #fff;
  border: 2px solid var(--blue); border-radius: 10px; cursor: pointer;
}

.error { color: #b3261e; font-weight: 600; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.totalbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.9rem 1.25rem;
  background: var(--blue-dark); color: #fff;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}
.totalbar[hidden] { display: none; }
.totalbar-label { font-weight: 600; }
.totalbar-figure { font-size: 1.6rem; font-weight: 800; }

.site-footer {
  text-align: center; padding: 2rem 1rem;
  background: var(--bg-alt); color: var(--muted);
  font-size: 0.85rem; margin-top: 2rem;
}
.site-footer img { vertical-align: middle; margin: 0 0.5rem; }

/* Admin page: sign-in bar, history list, plain money-style layout. */
.admin-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.75rem 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
#admin-who { font-weight: 600; color: var(--muted); }
#save-status { color: var(--blue-dark); font-weight: 600; min-height: 1.2em; }
input[type="number"] {
  width: 100%;
  padding: 0.7rem;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
input[type="number"]:focus { outline: 3px solid rgba(30,63,168,0.35); border-color: var(--blue); }

#confirmation h2 { color: var(--blue-dark); }
/* Reference numbers contain hyphens; without this they wrap mid-reference,
   which makes them hard to read out over the phone. */
.ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700;
       white-space: nowrap; }
.vat-note { margin-top: -0.6rem; color: var(--muted); }
.est-total { font-size: 2rem; font-weight: 800; color: var(--blue-dark); }
.included { padding-left: 1.1rem; }
.included li { margin-bottom: 0.3rem; }

/* The PDF. Save-as-PDF from the browser prints only the estimate. */
@media print {
  body { padding: 0; background: #fff; }
  .site-header .strap, .intro, #estimate-form, .totalbar, .no-print { display: none !important; }
  #confirmation:not([hidden]) { display: block !important; }
  .site-footer { background: none; margin-top: 1.5rem; }
  .disclaimer { border-color: #666; background: none; }
  a[href]::after { content: ""; }
}

/* Admin page: recent-enquiries table. */
.enquiries { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.enquiries th, .enquiries td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.enquiries th { color: var(--muted); font-weight: 600; }
#enquiries-list { overflow-x: auto; }
