/* Matches www.clinilabs.co.uk and the other Clinilabs pages: Poppins, near-black headings, royal-blue actions, light grey page */
:root {
  --ink: #111111;
  --text: #4a5260;
  --muted: #6b7385;
  --line: #e3e8f0;
  --bg: #f4f7fa;
  --card: #ffffff;
  --blue: #2463eb;
  --blue-dark: #1d4fc4;
  --blue-soft: #e9effd;
  --green: #108474;
  --amber: #b7791f;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body.modal-open { overflow: hidden; }
a { color: var(--blue); }
[hidden] { display: none !important; }

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

.topbar { background: var(--blue); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 8px 16px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 14px; height: 68px; }
.logo img { height: 28px; display: block; }
.header-label { font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 4px 12px; }

.hero { padding: 36px 0 20px; max-width: 720px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.hero p { margin-top: 12px; color: var(--text); font-size: 16px; }

/* Search */
.search-bar { display: flex; gap: 10px; max-width: 720px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  padding: 0 20px 0 50px; font: inherit; color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search input::placeholder { color: #a0a7b4; }

.result-count { font-size: 13px; color: var(--muted); margin: 12px 0 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px;
  border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; border: 1.5px solid transparent;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #a8b8e6; cursor: default; }
.btn-outline { background: #fff; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }

/* List + map */
.finder { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 48px; }
.list-col { display: flex; flex-direction: column; min-height: 0; }
.clinic-list { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 150px); min-height: 480px; overflow-y: auto; padding: 2px 6px 2px 2px; }
.clinic-list::-webkit-scrollbar { width: 6px; }
.clinic-list::-webkit-scrollbar-thumb { background: #cfd6e2; border-radius: 3px; }
.map-col { position: sticky; top: 16px; }
#map { height: calc(100vh - 150px); min-height: 480px; border-radius: var(--radius); border: 1px solid var(--line); background: #e8edf3; z-index: 0; }

.clinic-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.clinic-card:hover { border-color: #c7d3ea; }
.clinic-card:focus-visible { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.clinic-card.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.card-top { display: flex; justify-content: space-between; gap: 12px; }
.clinic-card h2 { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 6px; }
.addr { font-size: 13px; color: var(--text); margin-top: 4px; }
.dist { flex: none; text-align: right; line-height: 1.1; }
.dist strong { display: block; font-size: 20px; font-weight: 700; }
.dist span { font-size: 12px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.net { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 10px; color: var(--blue); background: var(--blue-soft); }

.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.empty strong { color: var(--ink); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 14px 0 0; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink);
}
.pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination button.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .gap { color: var(--muted); padding: 0 2px; }

/* Map pins */
.pin { display: block; width: 14px; height: 14px; margin: 4px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(17,17,17,.35); }
.pin-active { width: 22px; height: 22px; margin: 0; background: var(--ink); border-width: 3px; }
.pin-origin { width: 18px; height: 18px; margin: 2px; background: var(--green); border-width: 3px; }
.leaflet-container { font-family: inherit; }
.leaflet-tooltip { font-family: 'Poppins', system-ui, sans-serif; font-weight: 500; }

/* Detail modal */
.modal { position: fixed; inset: 0; background: rgba(17,17,17,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal-card { background: #fff; border-radius: 20px; width: 100%; max-width: 600px; max-height: 90vh; overflow: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; color: var(--muted); cursor: pointer; border-radius: 50%; }
.modal-close:hover { background: var(--bg); }
.modal-close:focus-visible, .btn:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.modal-card h2 { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 8px 40px 18px 0; }
.modal-card h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; }
.modal-card p { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.modal-card .muted { color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.detail-grid h3 { margin-top: 0; }
.steps { padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.steps li::marker { color: var(--blue); font-weight: 700; }
.note { margin-top: 14px; background: var(--blue-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.note.warn { background: #fdf6e7; color: #6b4a0f; }
.kit-img { display: block; width: 100%; max-width: 420px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 20px; }
.modal-card > div > .btn, #detailBody > .btn { width: 100%; }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 20px 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .finder { grid-template-columns: minmax(0, 1fr); }
  .map-col { position: static; order: -1; }
  #map { height: 320px; min-height: 0; }
  .clinic-list { max-height: none; min-height: 0; overflow: visible; padding: 0; }
}
@media (max-width: 560px) {
  .hero { padding: 24px 0 14px; }
  .search-bar { flex-direction: column; }
  .search-bar .btn { width: 100%; }
  .header-label { display: none; }
  .modal-card { padding: 22px 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div + div h3 { margin-top: 16px; }
  #map { height: 260px; }
}

/* ---------- Booking (Tuli) ---------- */
.clinic-sub { font-size: 13.5px; color: var(--text); margin: -10px 0 4px; }
.btn-block { width: 100%; margin-top: 18px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; }
.progress { list-style: none; display: flex; gap: 6px; margin: 16px 0 4px; counter-reset: st; }
.progress li { flex: 1; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); counter-increment: st; }
.progress li::before { content: counter(st) '. '; }
.progress li.on { color: var(--blue); border-top-color: var(--blue); }
.loading { display: flex; align-items: center; gap: 10px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(36,99,235,.2); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }

.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.day { flex: none; width: 64px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 4px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: var(--ink); }
.day span { font-size: 11.5px; color: var(--muted); }
.day strong { font-size: 18px; }
.day:hover { border-color: var(--blue); }
.day.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.day.on span { color: #dce6fd; }
.slot-label { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px !important; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 0; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); }
.slot:hover { border-color: var(--blue); color: var(--blue); }
.slot.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn:disabled { cursor: default; }

.chosen { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--blue-soft); border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 14px; }
.chosen div { display: flex; flex-direction: column; }
.chosen span { color: var(--text); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font: inherit; color: var(--ink); background: #fff; outline: none; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hp { position: absolute; left: -9999px; }
.kit-help .kit-img { margin: 0 0 12px; }
.small-print { font-size: 12.5px !important; color: var(--muted) !important; margin-top: 12px; }
.form-error { color: #d0473e !important; font-size: 13.5px !important; margin-top: 10px; }

.done { text-align: center; padding: 8px 0 4px; }
.tick { width: 60px; height: 60px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; margin: 8px auto 12px; }
.tick svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-title { font-size: 20px !important; color: var(--ink) !important; text-transform: none !important; letter-spacing: 0 !important; margin: 0 0 8px !important; }
@media (max-width: 560px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.human-check { margin-top: 14px; min-height: 65px; }
