/* BABE Medical Registration V1 */
.babe-med-label-id { display: block; font-weight: 600; margin-bottom: 0.15rem; }
.babe-med-label-en { display: block; font-size: 0.92em; color: #555; margin-bottom: 0.35rem; }
.babe-med-form-wrap,
.babe-med-review,
.babe-med-status { max-width: 920px; margin: 0 auto 2rem; }
.babe-med-form-header { margin-bottom: 1.5rem; border-bottom: 1px solid #e5e5e5; padding-bottom: 1rem; }
.babe-med-form-header h1 { font-size: 1.35rem; margin: 0 0 0.25rem; }
.babe-med-form-header h2 { font-size: 1.05rem; font-weight: 500; color: #444; margin: 0; }
.babe-med-clinic { color: #888; font-size: 0.9rem; }
.babe-med-rev-badge { display: inline-block; background: #f3f3f3; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.85rem; }
.babe-med-section { margin: 1.75rem 0; padding: 1rem 0; border-top: 1px solid #eee; }
.babe-med-section-title { font-size: 1.1rem; margin: 0 0 1rem; }
.babe-med-field { margin-bottom: 1rem; }
.babe-med-field input[type="text"],
.babe-med-field input[type="email"],
.babe-med-field input[type="tel"],
.babe-med-field input[type="date"],
.babe-med-field input[type="number"],
.babe-med-field input[type="url"],
.babe-med-field select,
.babe-med-field textarea { width: 100%; max-width: 100%; padding: 0.5rem 0.65rem; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.babe-med-radio,
.babe-med-check { display: block; margin: 0.35rem 0; cursor: pointer; }
.babe-med-help { font-size: 0.88rem; color: #666; margin: 0.25rem 0 0.5rem; }
.babe-med-details { margin-top: 0.5rem; padding-left: 0.75rem; border-left: 3px solid #ddd; }
.babe-med-details.is-hidden { display: none; }
.babe-med-section-conditional.is-hidden { display: none; }
.babe-med-consent-text { font-size: 0.95rem; line-height: 1.45; margin: 0.5rem 0; }
.babe-med-signature-wrap { border: 1px dashed #bbb; padding: 0.5rem; background: #fafafa; max-width: 520px; }
.babe-med-signature-pad { display: block; width: 100%; max-width: 500px; height: 140px; background: #fff; border: 1px solid #ccc; touch-action: none; cursor: crosshair; }
.babe-med-privacy-note { font-size: 0.88rem; color: #444; background: #f6f8fa; border: 1px solid #dde3ea; padding: 0.65rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.babe-med-private-upload { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; margin-top: 0.5rem; }
.babe-med-private-preview { width: 120px; min-height: 80px; border: 1px solid #ccc; border-radius: 4px; background: #f5f5f5; overflow: hidden; }
.babe-med-private-preview.is-empty { min-height: 60px; }
.babe-med-private-preview img { display: block; width: 100%; height: auto; object-fit: cover; }
.babe-med-upload-label { position: relative; overflow: hidden; }
.babe-med-upload-label input[type="file"] { position: absolute; left: -9999px; }
.babe-med-id-staff-block { margin: 1rem 0; padding: 1rem; background: #f8f9fb; border: 1px solid #dde3ea; border-radius: 6px; }
.babe-med-field-stub .babe-med-note { color: #666; }
.babe-med-btn,
.babe-med-btn-small { display: inline-block; padding: 0.55rem 1rem; border: 1px solid #333; background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.95rem; margin: 0.25rem 0.25rem 0.25rem 0; }
.babe-med-btn-primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.babe-med-btn-secondary { background: #f5f5f5; }
.babe-med-btn-small { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.babe-med-actions { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eee; }
.babe-med-locked-notice { background: #fff8e6; border: 1px solid #f0d78c; padding: 1rem; border-radius: 4px; margin-top: 1rem; }
.babe-med-status { padding: 1rem; border: 1px solid #ddd; border-radius: 6px; background: #fafafa; }
.babe-med-status-pending_review { border-color: #e6c200; background: #fffbea; }
.babe-med-status-reviewed { border-color: #6bbf59; background: #f4fff0; }
.babe-med-gate { text-align: center; padding: 2rem 1rem; }
.babe-med-filters { margin: 1rem 0; }
.babe-med-filter { display: inline-block; margin-right: 0.5rem; padding: 0.35rem 0.75rem; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: inherit; }
.babe-med-filter.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.babe-med-review-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.babe-med-review-table th,
.babe-med-review-table td { border: 1px solid #ddd; padding: 0.5rem 0.65rem; text-align: left; font-size: 0.92rem; }
.babe-med-staff-actions { margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.babe-med-doctor-sign { margin: 1.5rem 0; padding: 1rem; border: 1px solid #ddd; background: #f9f9f9; }
.babe-med-doctor-name { width: 100%; max-width: 320px; margin-bottom: 0.5rem; padding: 0.45rem; }
.babe-med-reminder { background: #f5f9ff; border-left: 3px solid #4a90d9; padding: 0.65rem 0.85rem; margin: 0.75rem 0; font-size: 0.92rem; }
.babe-med-revision-history ul { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.babe-med-revision-history li a { display: inline-block; padding: 0.35rem 0.65rem; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: inherit; font-size: 0.88rem; }
.babe-med-revision-history li.is-active a { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.babe-med-staff-sign { margin: 1rem 0; padding: 1rem; border: 1px solid #ddd; background: #fafafa; }
.babe-med-staff-name { width: 100%; max-width: 320px; margin-bottom: 0.5rem; padding: 0.45rem; }
.babe-med-audit-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.5rem; }
.babe-med-audit-table th, .babe-med-audit-table td { border: 1px solid #ddd; padding: 0.35rem 0.5rem; text-align: left; }
.babe-med-clinic-workflow { background: #f9f9f9; border: 1px solid #ddd; padding: 0.75rem; margin-bottom: 1rem; }
.babe-med-workflow-list { margin: 0.35rem 0 0; padding-left: 1rem; }
.babe-med-field.is-hidden { display: none; }
.babe-med-section-conditional.is-hidden { display: none; }
.babe-med-print-meta { font-size: 0.9rem; }
.babe-med-print-archive { margin-top: 1rem; font-size: 0.95rem; }
.babe-med-print-static { font-size: 0.92rem; margin: 0.25rem 0; }
.babe-med-msg { padding: 0.65rem 0.85rem; margin: 0.75rem 0; border-radius: 4px; }
.babe-med-msg-ok { background: #e8f5e9; border: 1px solid #a5d6a7; }
.babe-med-msg-err { background: #ffebee; border: 1px solid #ef9a9a; }

/* Authorised view + A4 print */
.babe-med-authorised-view { max-width: 920px; margin: 0 auto 2rem; }
.babe-med-view-toolbar { margin-bottom: 1.25rem; padding: 1rem; border: 1px solid #ddd; border-radius: 6px; background: #fafafa; }
.babe-med-view-status { margin: 0 0 0.35rem; font-size: 1.05rem; }
.babe-med-view-date { margin: 0 0 0.75rem; color: #444; }
.babe-med-view-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.babe-med-doc { max-width: 920px; }
.babe-med-doc-header { border-bottom: 2px solid #181411; padding-bottom: 0.75rem; margin-bottom: 1rem; }
.babe-med-doc-brand { font-weight: 700; letter-spacing: 0.08em; margin: 0 0 0.35rem; }
.babe-med-doc-header h1 { font-size: 1.2rem; margin: 0 0 0.25rem; }
.babe-med-doc-sub { margin: 0 0 0.75rem; color: #444; }
.babe-med-doc-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.babe-med-doc-meta span { display: inline-block; min-width: 11rem; font-weight: 600; }
.babe-med-doc-section { margin: 1.25rem 0; }
.babe-med-doc-section h2 { font-size: 1.05rem; margin: 0 0 0.65rem; border-bottom: 1px solid #ddd; padding-bottom: 0.25rem; }
.babe-med-doc-row { display: flex; gap: 1rem; margin: 0.35rem 0; }
.babe-med-doc-label { flex: 0 0 42%; }
.babe-med-doc-value { flex: 1; border-bottom: 1px dotted #bbb; min-height: 1.3em; }
.babe-med-doc-blank { display: inline-block; min-width: 4rem; }
.babe-med-doc-opt { display: inline-block; margin: 0 0.65rem 0.2rem 0; }
.babe-med-doc-details { margin: 0 0 0.5rem 42%; font-size: 0.92rem; font-style: italic; }
.babe-med-doc-static { font-size: 0.92rem; line-height: 1.45; margin: 0.35rem 0; }
.babe-med-doc--screen .babe-med-print-running-footer { display: none; }
.babe-med-sig-block p { margin: 0.2rem 0; letter-spacing: 0.01em; }
.babe-med-print-sheet { width: 100%; border-collapse: collapse; }
.babe-med-print-running-head, .babe-med-print-running-foot { padding: 0; }

@page {
  size: A4;
  margin: 18mm 14mm 48mm 14mm;
}

@media print {
  body.babe-med-print-body { margin: 0; font-size: 11pt; color: #000; }
  .babe-med-view-toolbar, .babe-med-btn, .babe-med-staff-actions { display: none !important; }
  .babe-med-doc, .babe-med-print-doc { max-width: 100%; }
  .babe-med-doc-header { text-align: left; margin-bottom: 1rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
  .babe-med-doc-section { page-break-inside: auto; margin-bottom: 0.75rem; }
  .babe-med-doc-row { page-break-inside: avoid; }
  .babe-med-doc-value { overflow: visible; }
  .babe-med-print-sheet { width: 100%; border-collapse: collapse; }
  .babe-med-print-sheet thead { display: table-header-group; }
  .babe-med-print-sheet tfoot { display: table-footer-group; }
  .babe-med-print-running-head {
    font-size: 9pt;
    padding-bottom: 3mm;
    border-bottom: 0.4pt solid #000;
  }
  .babe-med-print-running-foot {
    height: 42mm;
    vertical-align: top;
    padding-top: 3mm;
    border-top: 0.6pt solid #000;
  }
  .babe-med-print-page-num { font-size: 9pt; margin: 0.35rem 0 0; }
  .babe-med-print-page-num .babe-med-page-x::after { content: counter(page); }
  .babe-med-print-page-num .babe-med-page-y::after { content: counter(pages); }
  .babe-med-print-conf { font-size: 8pt; margin: 0.15rem 0 0; }
  .babe-med-print-header { text-align: center; margin-bottom: 1rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
  .babe-med-print-section { page-break-inside: avoid; margin-bottom: 0.75rem; }
  .babe-med-print-section h4 { font-size: 11pt; margin: 0.75rem 0 0.35rem; border-bottom: 1px solid #ccc; }
  .babe-med-print-row { display: flex; margin: 0.2rem 0; }
  .babe-med-print-label { flex: 0 0 42%; font-size: 9.5pt; }
  .babe-med-print-value { flex: 1; font-size: 10pt; border-bottom: 1px dotted #999; min-height: 1.2em; }
  .babe-med-print-details { margin: 0 0 0.35rem 42%; font-size: 9.5pt; font-style: italic; }
  .babe-med-print-sig img { max-height: 80px; }
  .babe-med-print-wet-line { margin-top: 1.5rem; }
  .babe-med-print-footer { margin-top: 2rem; text-align: center; font-size: 9pt; border-top: 1px solid #000; padding-top: 0.5rem; }
}

.babe-med-print-body .babe-med-label-id { font-weight: 600; }
.babe-med-print-body .babe-med-label-en { font-size: 0.9em; color: #333; }

/* Premium secure medical form — scoped. Do not affect site-wide Hello chrome. */
body.babe-med-secure-page {
  background: #f5f2ed !important;
  color: #181411;
}
body.babe-med-secure-page .pchi-site-header,
body.babe-med-secure-page header.site-header,
body.babe-med-secure-page #masthead,
body.babe-med-secure-page .elementor-location-header,
body.babe-med-secure-page .ehf-header,
body.babe-med-secure-page .babe-mega-menu,
body.babe-med-secure-page .pchi-mega-menu,
body.babe-med-secure-page .babe-header-logo,
body.babe-med-secure-page .elementor-location-footer,
body.babe-med-secure-page footer.site-footer,
body.babe-med-secure-page .site-footer,
body.babe-med-secure-page .babe-floating-actions,
body.babe-med-secure-page #gt_float_wrapper,
body.babe-med-secure-page .gtranslate_wrapper,
body.babe-med-secure-page .skiptranslate,
body.babe-med-secure-page #google_translate_element,
body.babe-med-secure-page #tawkchat-container,
body.babe-med-secure-page .widget-visible,
body.babe-med-secure-page iframe[title*="chat"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.babe-med-secure-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #181411;
}
.babe-med-secure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
}
.babe-med-secure-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.babe-med-secure-logo { display: block; height: 28px; width: auto; }
.babe-med-secure-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.16em;
  font-size: 18px;
}
.babe-med-secure-kicker {
  font-size: 12px;
  color: #6f6861;
}
.babe-med-secure-badge {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8d603d;
}
.babe-med-secure-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e3ddd6;
  color: #6f6861;
  font-size: 14px;
}
.babe-med-secure-footer a { color: #8d603d; }

.babe-med-form-wrap--patient {
  max-width: 900px;
  margin: 0 auto;
}
.babe-med-form-wrap--patient .babe-med-label-en {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #181411;
  margin: 0;
}
.babe-med-form-wrap--patient .babe-med-label-id {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #6f6861;
  margin: 2px 0 0;
}
.babe-med-eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8d603d;
}
.babe-med-title {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}
.babe-med-subhead {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #181411;
}
.babe-med-lang-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6f6861;
}
.babe-med-status-card {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fffdf9;
  border: 1px solid #e3ddd6;
  border-radius: 14px;
}
.babe-med-status-card-title { margin: 0; font-size: 14px; font-weight: 600; }
.babe-med-clinic { margin: 4px 0 0; font-size: 13px; color: #6f6861; }

.babe-med-progress { margin: 18px 0 8px; overflow-x: auto; }
.babe-med-progress ol {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  min-width: min-content;
}
.babe-med-progress a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  color: #6f6861;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid transparent;
}
@media (min-width: 900px) {
  .babe-med-progress a { white-space: normal; line-height: 1.2; }
}
.babe-med-progress a.is-active,
.babe-med-progress a:focus-visible {
  color: #181411;
  border-color: #e3ddd6;
  background: #fffdf9;
}
.babe-med-progress-num {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #181411;
  color: #fffdf9;
  font-size: 11px;
}

.babe-med-form-wrap--patient .babe-med-card {
  background: #fffdf9;
  border: 1px solid #e3ddd6;
  border-radius: 18px;
  padding: 30px;
  margin: 26px 0 0;
}
.babe-med-form-wrap--patient .babe-med-section-title {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.babe-med-form-wrap--patient .babe-med-section-title .babe-med-label-en { font-size: 13px; letter-spacing: 0.12em; }
.babe-med-form-wrap--patient .babe-med-section-title .babe-med-label-id { text-transform: none; letter-spacing: 0; }

.babe-med-form-wrap--patient .babe-med-field { margin-bottom: 16px; }
.babe-med-form-wrap--patient .babe-med-field input[type="text"],
.babe-med-form-wrap--patient .babe-med-field input[type="email"],
.babe-med-form-wrap--patient .babe-med-field input[type="tel"],
.babe-med-form-wrap--patient .babe-med-field input[type="date"],
.babe-med-form-wrap--patient .babe-med-field input[type="number"],
.babe-med-form-wrap--patient .babe-med-field input[type="url"],
.babe-med-form-wrap--patient .babe-med-field select,
.babe-med-form-wrap--patient .babe-med-field textarea {
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cec7c0;
  border-radius: 12px;
  background: #fff;
  color: #181411;
  font-size: 16px;
  box-sizing: border-box;
}
.babe-med-form-wrap--patient .babe-med-field textarea { min-height: 96px; }
.babe-med-form-wrap--patient .babe-med-field--readonly input,
.babe-med-form-wrap--patient .babe-med-field--readonly select,
.babe-med-form-wrap--patient .babe-med-field--readonly textarea,
.babe-med-form-wrap--patient .babe-med-field--prefilled input {
  background: #f8f5f0;
  color: #181411;
  opacity: 1;
}
.babe-med-prefill-note { margin: 4px 0 8px; font-size: 12px; color: #6f6861; }
.babe-med-form-wrap--patient .babe-med-field input:focus-visible,
.babe-med-form-wrap--patient .babe-med-field select:focus-visible,
.babe-med-form-wrap--patient .babe-med-field textarea:focus-visible,
.babe-med-form-wrap--patient .babe-med-radio input:focus-visible,
.babe-med-form-wrap--patient .babe-med-check input:focus-visible,
.babe-med-form-wrap--patient .babe-med-btn:focus-visible,
.babe-med-progress a:focus-visible {
  outline: 2px solid #8d603d;
  outline-offset: 2px;
}

.babe-med-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.babe-med-radio {
  flex: 1 1 140px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cec7c0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.babe-med-radio:has(input:checked) {
  border-color: #181411;
  background: #f8f5f0;
}
.babe-med-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  margin: 8px 0;
  cursor: pointer;
}
.babe-med-submit-note { color: #6f6861; font-size: 14px; line-height: 1.55; }
.babe-med-form-wrap--patient .babe-med-btn {
  min-height: 48px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
}
.babe-med-form-wrap--patient .babe-med-btn-primary {
  display: block;
  width: 100%;
  background: #181411;
  color: #fffdf9;
  border-color: #181411;
  margin-top: 10px;
}
.babe-med-form-wrap--patient .babe-med-btn-secondary {
  width: 100%;
  background: transparent;
}
.babe-med-error-summary {
  background: #f8f5f0;
  border: 1px solid #cec7c0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.babe-med-error-summary[hidden] { display: none; }
.babe-med-error-summary a { color: #8d603d; }
.babe-med-field.is-invalid input,
.babe-med-field.is-invalid select,
.babe-med-field.is-invalid textarea,
.babe-med-field.is-invalid .babe-med-radio-group {
  border-color: #8d603d;
}
.babe-med-field-error { margin: 6px 0 0; font-size: 13px; color: #8d603d; }
.babe-med-field-error[hidden] { display: none; }
.babe-med-success {
  background: #fffdf9;
  border: 1px solid #e3ddd6;
  border-radius: 18px;
  padding: 32px 28px;
}
.babe-med-success .babe-med-btn-primary { display: inline-flex; width: auto; min-width: 220px; justify-content: center; text-decoration: none; }
.babe-med-link { color: #8d603d; }

@media (max-width: 820px) {
  .babe-med-secure-shell { padding: 16px; }
  .babe-med-form-wrap--patient .babe-med-card { padding: 20px 16px; margin-top: 20px; border-radius: 16px; }
  .babe-med-title { font-size: 24px; }
  .babe-med-progress-label { display: none; }
  .babe-med-radio { flex: 1 1 100%; }
}
@media (max-width: 390px) {
  .babe-med-secure-shell { padding: 16px 16px 40px; overflow-x: hidden; }
  .babe-med-secure-logo { height: 24px; }
  .babe-med-title { font-size: 22px; }
}
