/* Church View Pharmacy — Patient Questionnaire System */

:root {
  --brand: #0f766e;          /* deep teal — pharmacy/clinical */
  --brand-dark: #0b5b54;
  --brand-soft: #ccfbf1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 16px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--brand);
  color: #fff;
  border-radius: 9px;
  display: grid; place-items: center;
}
.brand-tagline {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.header-actions a {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
}
.header-actions a:hover {
  background: var(--bg);
  text-decoration: none;
}

/* ---------- Layout containers ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 32px 24px 80px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 32px 24px 80px; }

/* ---------- Landing / service select ---------- */
.hero {
  text-align: center;
  padding: 48px 16px 24px;
}
.hero h1 {
  font-size: 32px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero p { color: var(--text-muted); margin: 0 auto; max-width: 560px; font-size: 16px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.service-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 4px;
  flex-shrink: 0;
}
.service-icon svg { width: 26px; height: 26px; }

.form-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 14px;
}
.form-icon svg { width: 28px; height: 28px; }

.badge-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-icon svg { width: 13px; height: 13px; flex-shrink: 0; }

.modal-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.modal-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}
.modal-icon-wrap svg { width: 20px; height: 20px; }
.service-card h3 { margin: 4px 0 0; font-size: 18px; font-weight: 600; color: var(--text); }
.service-card p { margin: 0; color: var(--text-muted); font-size: 14px; }
.service-cta {
  margin-top: 8px;
  font-size: 14px;
  color: var(--brand);
  font-weight: 600;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-header { margin-bottom: 24px; }
.form-header h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.form-header p { margin: 0; color: var(--text-muted); }
.form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.form-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-weight: 600;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.field .required { color: var(--danger); margin-left: 2px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.15);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .help { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 400;
  margin: 0;
  transition: background .15s ease, border-color .15s ease;
}
.radio-group label:hover, .checkbox-group label:hover {
  background: var(--bg);
  border-color: var(--border-strong);
}
.radio-group input, .checkbox-group input { margin: 0; accent-color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 24px; }

/* ---------- Status messages ---------- */
.notice {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin: 16px 0;
}
.notice.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.notice.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.notice.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.success-screen {
  text-align: center;
  padding: 60px 32px;
}
.success-screen .check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 20px;
  font-size: 32px;
}
.success-screen h2 { font-size: 24px; margin: 0 0 8px; }
.success-screen p { color: var(--text-muted); }

/* ---------- Dashboard ---------- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.dashboard-header h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.dashboard-header .sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
}
.live-pill::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.4); }
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-weight: 600;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input[type="search"],
.toolbar select {
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.toolbar input[type="search"] { min-width: 260px; flex: 1; }
.toolbar .spacer { flex: 1; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
table.data tbody tr { transition: background .12s ease; cursor: pointer; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr:last-child td { border-bottom: none; }
.empty {
  padding: 60px 32px;
  text-align: center;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.badge.gray { background: #f1f5f9; color: var(--text-muted); }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.red { background: #fee2e2; color: #991b1b; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h2 { margin: 0 0 4px; font-size: 20px; }
.modal-header .sub { color: var(--text-muted); font-size: 13px; }
.modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-muted); padding: 0; line-height: 1; padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-body dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  margin: 0;
}
.modal-body dt {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.modal-body dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}
.modal-body h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 20px 0 10px;
  font-weight: 600;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---- Multi-pharmacy picker additions (v9) ---- */
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 8px;
}
.modal-narrow { max-width: 480px; }
.modal-backdrop { align-items: center; justify-content: center; }
.modal-backdrop[style*="flex"] { display: flex !important; }

.pharmacy-pick-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pharmacy-option {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
  font: inherit;
  color: inherit;
}
.pharmacy-option:hover {
  border-color: #0f766e;
  background: #f0fdfa;
}
.pharmacy-option:active { transform: translateY(1px); }
.pharmacy-option-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ccfbf1;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pharmacy-option-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text, #0f172a);
}
.pharmacy-option-cta {
  font-size: 13px;
  color: #0f766e;
  font-weight: 500;
}

.pharmacy-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  margin: 6px 0 12px;
}
.pharmacy-tag strong { color: #0f172a; font-weight: 600; }

/* ---- Open Clinix brand wordmark (v12) ---- */
.brand-name {
  display: block;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
  line-height: 1.1;
}
.brand-tagline {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 0.01em;
}

/* EC chain — modal upsell + prefilled fields */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fadeIn 160ms ease-out;
}
.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 22px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
}
.modal-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #0f172a;
}
.modal-card p {
  margin: 6px 0;
  color: #334155;
  font-size: 14.5px;
  line-height: 1.5;
}
input.prefilled, textarea.prefilled, select.prefilled {
  background: #f1f5f9 !important;
  color: #475569;
  cursor: not-allowed;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Signature pad */
.signature-field {
  margin-top: 4px;
}
.signature-pad {
  width: 100%;
  max-width: 600px;
  height: 180px;
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background-image:
    linear-gradient(180deg, transparent 0%, transparent calc(100% - 36px), #e2e8f0 calc(100% - 36px), #e2e8f0 calc(100% - 35px), transparent calc(100% - 35px));
}
.signature-field.signature-error .signature-pad {
  border-color: #dc2626;
  background-color: #fef2f2;
}
.signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.signature-hint {
  font-size: 13px;
  color: #64748b;
}
.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

/* Language toggle (Somali/English) — only visible on sites with LANG_ENABLED */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 6px;
}
.lang-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
}
.lang-toggle button.active {
  background: var(--brand);
  color: white;
}
.lang-toggle button:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* -------------------------------------------------------------------------
   RTL (right-to-left) language support — activates when <html dir="rtl">
   Used by the Arabic (AR) locale on Saydon patient site.
   ------------------------------------------------------------------------- */

html[dir="rtl"] {
  /* Give Arabic script a slightly larger x-height for legibility */
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
}

/* Flip the primary content flow */
html[dir="rtl"] body,
html[dir="rtl"] .container,
html[dir="rtl"] .page,
html[dir="rtl"] .form-shell,
html[dir="rtl"] .service-grid,
html[dir="rtl"] .brand,
html[dir="rtl"] .header-actions {
  text-align: right;
}

/* Keep the header row itself flowing right-to-left */
html[dir="rtl"] .site-header .container {
  flex-direction: row-reverse;
}
html[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}

/* Language toggle: keep buttons in the same visual order the user reads
   (EN / SO / AR left-to-right regardless of dir) */
html[dir="rtl"] .lang-toggle {
  direction: ltr;
}

/* Form fields — label alignment */
html[dir="rtl"] label,
html[dir="rtl"] .field-label,
html[dir="rtl"] .field-help,
html[dir="rtl"] .field-required,
html[dir="rtl"] legend {
  text-align: right;
}

/* Input/textarea/select — keep numeric placeholders LTR but Arabic text RTL */
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

/* Numeric / phone / postcode / date fields feel better LTR */
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[dir="ltr"] {
  direction: ltr;
  text-align: right;
}

/* Radio / checkbox rows — swap the visual order so the input sits on the right */
html[dir="rtl"] .radio-row,
html[dir="rtl"] .checkbox-row,
html[dir="rtl"] .yes-no-row,
html[dir="rtl"] .field-inline {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* Left-aligned action bars should flip to right */
html[dir="rtl"] .form-actions,
html[dir="rtl"] .actions,
html[dir="rtl"] .btn-row {
  flex-direction: row-reverse;
}

/* Service card layout — arrows and chevrons */
html[dir="rtl"] .service-card .arrow,
html[dir="rtl"] .service-card .chevron {
  transform: scaleX(-1);
}

/* Back-link (← All services) becomes → in RTL */
html[dir="rtl"] #backLink {
  direction: rtl;
}

/* Footer stays centered but with RTL text flow */
html[dir="rtl"] .site-footer {
  text-align: center;
  direction: rtl;
}

/* Signature pad instruction — arabic reads right-to-left */
html[dir="rtl"] .signature-help {
  text-align: right;
}

/* Modal / dialog content */
html[dir="rtl"] .modal,
html[dir="rtl"] .modal-body,
html[dir="rtl"] .modal-content {
  text-align: right;
  direction: rtl;
}

/* ---- Section headings inside long questionnaires ---- */
.q-heading { margin: 28px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.q-heading h3 { margin: 0; font-size: 17px; color: var(--text); }
.q-heading-help { margin: 6px 0 0; color: var(--text-muted); font-size: 14px; }

/* ---- Photo upload field ---- */
.photo-field input[type="file"] { display: block; width: 100%; padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: #f8fafc; font-size: 15px; }
.photo-preview { display: block; max-width: 100%; max-height: 360px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--border); }
.photo-actions { margin-top: 8px; }
.photo-field { border: 2px dashed transparent; border-radius: 12px; padding: 4px; transition: border-color .15s, background .15s; outline: none; }
.photo-field.photo-hover, .photo-field:focus-within { border-color: #0e7490; background: #ecfeff; }
.photo-hint { margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* Notices in the questionnaire (age gate, eligibility, submit problems) */
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; background: #eef4fb; color: #1e3a5f; border: 1px solid #cfe0f3; font-size: 15px; line-height: 1.45; }
.alert-warn { background: #fef3c7; color: #7c2d12; border-color: #fcd34d; }
.alert-stop { background: #fde8e8; color: #7f1d1d; border-color: #f5a3a3; }
.sh-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .65); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sh-box { background: #fff; border-radius: 14px; max-width: 460px; width: 100%; padding: 22px 20px; border-top: 6px solid #b91c1c; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.sh-box h2 { margin: 0 0 10px; color: #991b1b; font-size: 20px; }
.sh-box p { margin: 0 0 10px; line-height: 1.5; font-size: 16px; }
.sh-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sh-end { padding: 8px 4px; border-top: 6px solid #b91c1c; }
.sh-end h1 { color: #991b1b; font-size: 24px; margin: 14px 0 12px; }
.sh-end p { font-size: 17px; line-height: 1.55; margin: 0 0 12px; }

/* Required staff step inside a questionnaire (contraception BP check, 9 Nov 2026) */
.q-heading.q-alert { border: 2px solid #1d4ed8; border-radius: 12px; background: #eff6ff; padding: 16px 18px; }
.q-heading.q-alert h3 { color: #1d4ed8; }
.q-heading.q-alert .q-heading-help { color: #1e293b; font-size: 15px; font-weight: 500; }
input.computed { background: #f1f5f9; font-weight: 700; color: #0f172a; cursor: default; }
