/* ClinicFlow public widgets — fully scoped under .cf-app so no theme can
   bleed in and we never bleed out. */
.cf-app, .cf-app * { all: revert; box-sizing: border-box; }
.cf-app { --cf-brand: #0d9488; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #0f172a; line-height: 1.5; }

/* capture form. Width and corner radius come from the form's own settings via
   --cf-fw / --cf-fr, so a wide two-column appointment form and a narrow inline
   enquiry box are the same code with different numbers. */
.cf-app .cf-capture { max-width: var(--cf-fw, 480px); margin: 0 auto; background: #fff;
  border: 1px solid #e2e8f0; border-radius: var(--cf-fr, 16px); padding: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }

/* Two-column rows. A half-width field takes one column; on a narrow screen the
   grid collapses to one so nothing is ever squeezed. */
.cf-app .cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cf-app .cf-f { grid-column: span 2; min-width: 0; }
.cf-app .cf-w-half { grid-column: span 1; }
@media (max-width: 560px) { .cf-app .cf-w-half { grid-column: span 2; } }

.cf-app .cf-fhead { margin: 18px 0 2px; font-size: 15px; font-weight: 700; color: #0f172a;
  padding-top: 12px; border-top: 1px solid #e2e8f0; }
.cf-app .cf-f:first-child .cf-fhead { margin-top: 0; padding-top: 0; border-top: 0; }
.cf-app .cf-fhelp { margin: 4px 0 0; font-size: 12px; color: #64748b; }
.cf-app .cf-ferr { margin: 4px 0 0; font-size: 12px; color: #b91c1c; min-height: 0; }
.cf-app .cf-f.err input, .cf-app .cf-f.err select, .cf-app .cf-f.err textarea { border-color: #dc2626; }
.cf-app .cf-req { color: #dc2626; font-style: normal; }
.cf-app .cf-scr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* choice groups */
.cf-app .cf-choices { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.cf-app .cf-choice { display: flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 400 !important; color: #334155; margin: 0 !important; cursor: pointer; }
.cf-app .cf-choice input { width: auto !important; margin: 0; }

/* multi-step */
.cf-app .cf-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; }
.cf-app .cf-stepdot { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px;
  color: #94a3b8; border-top: 3px solid #e2e8f0; padding-top: 7px; }
.cf-app .cf-stepdot.on, .cf-app .cf-stepdot.done { color: var(--cf-brand); border-top-color: var(--cf-brand); }
.cf-app .cf-stepdot b { font-size: 12px; }
.cf-app .cf-actions { display: flex; gap: 10px; margin-top: 18px; }
.cf-app .cf-actions button { flex: 1; padding: 13px; border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer; background: var(--cf-brand); color: #fff; }
.cf-app .cf-back { background: #fff !important; color: #334155 !important; border: 1px solid #cbd5e1 !important; }

/* dark theme */
.cf-app.cf-theme-dark .cf-capture { background: #111c33; border-color: #24334f; color: #e2e8f0; }
.cf-app.cf-theme-dark .cf-capture .cf-flabel, .cf-app.cf-theme-dark .cf-capture .cf-sub,
.cf-app.cf-theme-dark .cf-choice, .cf-app.cf-theme-dark .cf-consent { color: #cbd5e1; }
.cf-app.cf-theme-dark .cf-capture input:not([type=checkbox]):not([type=radio]),
.cf-app.cf-theme-dark .cf-capture select, .cf-app.cf-theme-dark .cf-capture textarea {
  background: #0b1424; border-color: #2b3b5a; color: #e2e8f0; }
.cf-app.cf-theme-dark .cf-fhead { color: #e2e8f0; border-top-color: #24334f; }
.cf-app .cf-capture h3 { margin: 0 0 4px; font-size: 20px; color: var(--cf-brand); }
.cf-app .cf-capture .cf-sub { margin: 0 0 16px; color: #475569; font-size: 14px; }
.cf-app .cf-capture label, .cf-app .cf-capture .cf-flabel {
  display: block; font-size: 13px; font-weight: 600; color: #334155; margin: 14px 0 0; }
/*
 * EVERY control, not a hand-listed few.
 *
 * This used to name only text, tel and select — so email, date and textarea
 * fields fell through completely and rendered as raw browser boxes sitting
 * inline beside their label, while the fields above them looked fine. The
 * clinic's own Appointment Request form has all three, which is why it looked
 * broken while Quick Enquiry looked correct. Select by exclusion instead, so a
 * field type added later is styled by default rather than forgotten.
 */
.cf-app .cf-capture input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.cf-app .cf-capture select,
.cf-app .cf-capture textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid #cbd5e1;
  border-radius: 10px; font-size: 15px; font-family: inherit; line-height: 1.4;
  background: #fff; color: #0f172a; -webkit-appearance: none; appearance: none; }
.cf-app .cf-capture textarea { min-height: 88px; resize: vertical; }
/* Re-instate the native arrow the appearance reset above removes. */
.cf-app .cf-capture select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 11px;
  padding-right: 34px; }
/* A date input keeps its picker button, which the appearance reset would hide. */
.cf-app .cf-capture input[type=date] { -webkit-appearance: revert; appearance: revert; }
.cf-app .cf-capture input:focus, .cf-app .cf-capture select:focus, .cf-app .cf-capture textarea:focus {
  outline: none; border-color: var(--cf-brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
.cf-app .cf-capture input::placeholder, .cf-app .cf-capture textarea::placeholder { color: #94a3b8; }
.cf-app .cf-hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; opacity: 0; }
.cf-app .cf-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px !important;
  font-size: 12.5px; color: #475569; font-weight: 400 !important; }
.cf-app .cf-consent input { width: auto !important; margin-top: 2px; }
.cf-app .cf-capture button[type=submit] { width: 100%; margin-top: 16px; padding: 13px; border: 0;
  border-radius: 10px; background: var(--cf-brand); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.cf-app .cf-capture button[type=submit]:disabled { opacity: .6; cursor: not-allowed; }
.cf-app .cf-msg { margin-top: 12px; font-size: 14px; text-align: center; min-height: 18px; }
.cf-app .cf-msg.ok { color: #15803d; }
.cf-app .cf-msg.err { color: #b91c1c; }

/* floating WhatsApp button */
.cf-app .cf-wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 99999; display: inline-flex;
  align-items: center; gap: 8px; background: #25d366; color: #fff !important; text-decoration: none !important;
  font-weight: 700; font-size: 14px; padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .45); }
.cf-app .cf-wa-fab:hover { filter: brightness(1.05); }
.cf-app .cf-wa-ic { font-size: 17px; }
