/*
Design Reminder for Global Styles
Chosen philosophy: Nordic clinical editorialism.
Use paper-light backgrounds, deep slate text, muted marine accents, editorial spacing, and soft administrative dividers.
Avoid loud gradients, purple tones, generic centered cards, and over-rounded UI.
*/
:root {
  font-size: 115%;
  color-scheme: light;
  --bg: #f4f7f7;
  --surface: rgba(252, 253, 252, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(69, 86, 93, 0.14);
  --line-strong: rgba(41, 60, 67, 0.2);
  --text: #21353b;
  --muted: #5e7177;
  --accent: #295d6b;
  --accent-soft: #dce9eb;
  --sage: #dfe8e1;
  --success: #32695d;
  --warning-bg: #fbf2df;
  --warning-text: #7d5b14;
  --shadow: 0 30px 80px rgba(34, 51, 58, 0.12);
  --shadow-soft: 0 18px 36px rgba(41, 60, 67, 0.08);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --hero-image: url("images/mitid-clinic-hero-bg.webp");
  --panel-image: url("images/mitid-form-texture-panel.webp");
  --banner-image: url("images/mitid-trust-banner-bg.webp");
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(221, 232, 234, 0.88), transparent 32%),
    linear-gradient(180deg, #f6f9f8 0%, #edf2f1 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[ng-cloak] {
  display: none !important;
}

.mockup-shell {
  min-height: 100vh;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(240, 245, 245, 0.72)),
    var(--hero-image) center/cover no-repeat;
  opacity: 0.96;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(32, 52, 59, 0.05) 0.8px, transparent 0.8px);
  background-size: 10px 10px;
  opacity: 0.18;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
  gap: 1.2rem;
  align-items: start;
  padding: 3rem clamp(1.25rem, 3vw, 2.25rem);
}

.hero-rail {
  position: sticky;
  top: 1.5rem;
  padding: 2rem 1.5rem 2rem 0.25rem;
}

.brand-chip,
.status-pill,
.api-chip,
.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.api-chip,
.inline-status {
  margin-top: 0.8rem;
}

.api-chip.success,
.inline-status.success {
  color: var(--success);
  border-color: rgba(50, 105, 93, 0.2);
  background: rgba(237, 246, 242, 0.94);
}

.hero-rail h1 {
  margin: 1.3rem 0 0.65rem;
  font-family: "Source Serif 4", serif;
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.hero-rail > p {
  margin: 0;
  max-width: 26rem;
  color: var(--muted);
  line-height: 1.7;
}

.progress-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.progress-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1rem 1rem 0;
  border-top: 1px solid rgba(41, 60, 67, 0.08);
  color: var(--muted);
}

.progress-list li.active {
  color: var(--text);
}

.progress-list p {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.progress-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.intake-column {
  display: grid;
  gap: 1.2rem;
  width: min(100%, 980px);
}

.trust-banner {
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(53, 74, 82, 0.12);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(248, 250, 250, 0.92)),
    var(--banner-image) center/cover no-repeat;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.trust-banner strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.trust-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.trust-progress-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  gap: 0.7rem;
}

.trust-progress-list li {
  grid-template-columns: 38px 1fr;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid rgba(41, 60, 67, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.trust-progress-list .progress-index {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 0.72rem;
  box-shadow: none;
}

.trust-progress-list p {
  font-size: 0.82rem;
  line-height: 1.45;
}

.panel-frame {
  padding: clamp(1.25rem, 2vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(54, 73, 81, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(251, 252, 252, 0.97)),
    var(--panel-image) center/cover no-repeat;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(48, 67, 74, 0.1);
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-header h2,
.field-section h3,
.privacy-box h3,
.modal-head h3 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.panel-header h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.registration-form {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.1rem;
}

.field-section {
  display: grid;
  gap: 0.85rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(48, 67, 74, 0.08);
}

.field-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.section-note {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 34rem;
  line-height: 1.55;
}

.field-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 65, 72, 0.08);
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.legend-required {
    background: linear-gradient(180deg, rgba(255, 250, 250, 0.98), rgba(255, 239, 239, 0.88));
    color: #8c2d2d;
}

.legend-prefilled {
    background: linear-gradient(180deg, rgba(241, 249, 252, 0.98), rgba(231, 244, 249, 0.9));
    color: #2f5f6c;
}

.legend-locked {
  background: rgba(62, 71, 77, 0.08);
  color: #4d5b61;
}

.field-grid {
  display: grid;
  gap: 0.85rem;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  position: relative;
  display: grid;
  gap: 0.42rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(46, 65, 72, 0.06);
}

.required-field {
  border-left-width: 3px;
  border-left-color: rgba(180, 55, 55, 0.5);
  background: linear-gradient(180deg, rgba(255, 250, 250, 0.98), rgba(255, 239, 239, 0.88));
}

.prefilled-field {
  border-left-width: 3px;
  border-left-color: rgba(75, 157, 190, 0.56);
  background: linear-gradient(180deg, rgba(241, 249, 252, 0.98), rgba(231, 244, 249, 0.9));
}

.required-field.prefilled-field {
  border-color: rgba(41, 113, 145, 0.42);
  border-left-color: rgba(75, 157, 190, 0.62);
  background: linear-gradient(180deg, rgba(241, 249, 252, 0.98), rgba(231, 244, 249, 0.92));
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.93rem;
  font-weight: 650;
}

.field-label em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1;
  color: #fff7f7;
  background: linear-gradient(180deg, #c45555 0%, #a03b3b 100%);
}

.field-help {
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-size: 0.78rem;
  line-height: 1.45;
}

.field-help.required-note::before {
  content: "Action required. ";
  color: var(--text);
  font-weight: 600;
}

.field-head-inline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.prefilled-intro {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(41, 93, 107, 0.1);
  background: linear-gradient(180deg, rgba(236, 244, 245, 0.92), rgba(246, 250, 250, 0.94));
}

.prefilled-intro strong {
  font-size: 0.94rem;
}

.prefilled-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.text-action {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    min-height: 50px;
    padding: 0.82rem 0.92rem;
    border-radius: 12px;
    border: 1px solid rgba(44, 64, 71, 0.14);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.required-field input[type="text"],
.required-field input[type="email"],
.required-field select {
  border-color: rgba(180, 55, 55, 0.42);
}

.required-field.prefilled-field input[type="text"] {
  border-color: rgba(41, 113, 145, 0.38);
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: rgba(41, 93, 107, 0.5);
  box-shadow: 0 0 0 4px rgba(41, 93, 107, 0.08);
}

.readonly-input {
  background: linear-gradient(180deg, rgba(241, 246, 246, 0.95), rgba(248, 251, 251, 0.92));
  border-style: dashed;
  color: #41565c;
}

.readonly-input[readonly] {
  cursor: default;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.radio-chip,
.checkbox-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(43, 63, 70, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.required-field .radio-chip,
.required-field.checkbox-row {
  border-color: rgba(162, 71, 71, 0.18);
}

.radio-chip:hover,
.checkbox-row:hover,
.dropdown-item:hover,
.submit-button:hover,
.close-button:hover,
.text-action:hover {
  transform: translateY(-1px);
}

.radio-chip.selected {
  border-color: rgba(41, 93, 107, 0.45);
  background: rgba(236, 244, 245, 0.92);
  box-shadow: 0 14px 28px rgba(41, 60, 67, 0.08);
}

.radio-chip input,
.checkbox-row input {
  accent-color: var(--accent);
}

.hidden-field {
  align-content: start;
}

.insurance-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(46, 65, 72, 0.1);
  background: rgba(255, 255, 255, 0.52);
}

.child-create-header {
  display: flex;
  justify-content: flex-end;
}

.child-create-toggle {
  margin-left: auto;
}

.child-form-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(41, 93, 107, 0.12);
  background:
    linear-gradient(180deg, rgba(244, 249, 249, 0.95), rgba(252, 253, 253, 0.98));
}

.child-registration-form {
  margin-top: 0;
}

.child-account-empty {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px dashed rgba(46, 65, 72, 0.16);
  background: rgba(250, 251, 251, 0.82);
  color: var(--muted);
}

.child-accounts-grid {
  display: grid;
  gap: 0.9rem;
}

.child-account-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(46, 65, 72, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.child-account-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.child-account-copy strong {
  font-size: 1rem;
  line-height: 1.35;
}

.child-account-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.child-account-label {
  font-size: 0.74rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent) !important;
}

.child-account-actions,
.child-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.child-unlink-btn {
  appearance: none;
  border: 1px solid rgba(46, 65, 72, 0.16);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.child-unlink-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 93, 107, 0.22);
  box-shadow: 0 10px 18px rgba(41, 60, 67, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.doctor-field > .field-label,
.insurance-field > .field-label {
  display: none;
}

.doctor-field .field-head-inline,
.insurance-field .field-head-inline {
  align-items: center;
}

.doctor-field .field-head-inline .field-label,
.insurance-field .field-head-inline .field-label {
  font-size: 0;
}

    .doctor-field .field-head-inline .field-label::before {
        content: "Læge (valgfrit)";
        font-size: 0.93rem;
        font-weight: 650;
        color: var(--text);
    }

    .insurance-field .field-head-inline .field-label::before {
        content: "Forsikringsselskab";
        font-size: 0.93rem;
        font-weight: 650;
        color: var(--text);
    }

.doctor-field .field-head-inline .field-label em,
.insurance-field .field-head-inline .field-label em {
  font-size: 0.72rem;
}

.doctor-typeahead,
.insurance-typeahead {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.doctor-typeahead.is-selected,
.insurance-typeahead.is-selected {
  gap: 0.5rem;
}

.doctor-input-wrap {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(41, 93, 107, 0.14);
  background:
    linear-gradient(180deg, rgba(238, 245, 246, 0.92), rgba(252, 253, 253, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: visible;
}

.insurance-input-wrap {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(41, 93, 107, 0.14);
  background:
    linear-gradient(180deg, rgba(238, 245, 246, 0.92), rgba(252, 253, 253, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: visible;
}

.doctor-input-wrap::before {
  content: "Lægesøgning";
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.insurance-input-wrap::before {
  content: "Forsikringssøgning";
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doctor-input-wrap input,
.insurance-input-wrap input {
  padding-right: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(41, 93, 107, 0.2);
}

.doctor-input-wrap:focus-within,
.insurance-input-wrap:focus-within {
  border-color: rgba(41, 93, 107, 0.32);
  box-shadow: 0 0 0 4px rgba(41, 93, 107, 0.07);
}

.doctor-hint,
.doctor-results-count {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.doctor-spinner {
  position: absolute;
  top: calc(50% + 0.5rem);
  right: 1rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(41, 93, 107, 0.16);
  border-top-color: var(--accent);
  animation: doctorSpin 0.75s linear infinite;
}

.doctor-results {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.45rem;
  max-height: 16rem;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(41, 93, 107, 0.12);
  background: rgba(248, 251, 251, 0.98);
  box-shadow: 0 22px 36px rgba(41, 60, 67, 0.12);
  backdrop-filter: blur(10px);
}

.doctor-result-item {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(46, 65, 72, 0.08);
  background: rgba(255, 255, 255, 0.94);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.doctor-result-item::after {
  content: "Vælg";
  justify-self: start;
  margin-top: 0.15rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(41, 93, 107, 0.07);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
}

.doctor-result-item:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 93, 107, 0.28);
  box-shadow: 0 14px 24px rgba(41, 60, 67, 0.08);
  background: rgba(252, 254, 254, 0.98);
}

.doctor-result-main,
.doctor-selected-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.doctor-result-main strong,
.doctor-selected-copy strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

.doctor-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(41, 93, 107, 0.09);
  border: 1px solid rgba(41, 93, 107, 0.14);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.doctor-result-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.doctor-no-results {
  margin-top: 0.15rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(46, 65, 72, 0.16);
  background: rgba(250, 251, 251, 0.82);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.doctor-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(50, 105, 93, 0.18);
  background:
    linear-gradient(180deg, rgba(238, 246, 242, 0.98), rgba(248, 252, 250, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.doctor-selected-info {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
}

.doctor-selected-info > div,
.doctor-selected-copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.doctor-selected-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
}

.doctor-clear-btn {
  appearance: none;
  border: 1px solid rgba(41, 93, 107, 0.16);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.doctor-clear-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 93, 107, 0.28);
  box-shadow: 0 10px 18px rgba(41, 60, 67, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.field.field-error .doctor-results,
.field.field-error .insurance-input-wrap {
  border-color: rgba(192, 57, 43, 0.24);
}

@keyframes doctorSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.dropdown-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 16px;
  border: 1px solid rgba(46, 65, 72, 0.1);
  background: rgba(250, 251, 251, 0.8);
}

.dropdown-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  width: 100%;
  border: 0;
  text-align: left;
  padding: 0.9rem 0.95rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  transition: background 180ms ease, transform 180ms ease;
}

.dropdown-item small,
.dropdown-empty,
.newsletter-row small,
.consent-row small {
  color: var(--muted);
  line-height: 1.5;
}

.dropdown-empty {
  padding: 1rem;
}

.compatibility-warning {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(125, 91, 20, 0.18);
  background: var(--warning-bg);
  color: var(--warning-text);
  line-height: 1.6;
}

.compact-policy {
  gap: 0.85rem;
}

.consent-row,
.newsletter-row {
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.consent-row {
  align-items: flex-start;
  width: 100%;
  background: rgba(255, 255, 255, 0.74);
}

.policy-inline-link,
.policy-back-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  font-weight: 600;
}

.policy-inline-link:hover,
.policy-back-link:hover {
  opacity: 0.86;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(48, 67, 74, 0.08);
}

.summary-note {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.65;
}

.summary-note strong {
  color: var(--text);
}

.submit-button,
.close-button {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 0.95rem 1.2rem;
  background: linear-gradient(180deg, #2d6572 0%, #244d57 100%);
  color: #f3f8f9;
  box-shadow: 0 18px 28px rgba(36, 77, 87, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.submit-button {
  margin-left: auto;
}

.close-button {
  background: rgba(40, 60, 67, 0.08);
  color: var(--text);
  box-shadow: none;
}

.submit-button:active,
.close-button:active,
.text-action:active,
.dropdown-item:active {
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(30, 43, 48, 0.44);
  backdrop-filter: blur(8px);
  isolation: isolate;
  animation: fadeIn 180ms ease;
}

.modal-card {
  position: relative;
  z-index: 10000;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 1.3rem 1.35rem;
  border-radius: 22px;
  background: rgba(252, 253, 253, 0.99);
  border: 1px solid rgba(41, 60, 67, 0.12);
  box-shadow: 0 32px 90px rgba(20, 31, 35, 0.28);
  animation: riseIn 220ms ease;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.modal-actions .submit-button {
  margin-left: 0;
}

.welcome-backdrop {
  background:
    linear-gradient(135deg, rgba(29, 45, 51, 0.5), rgba(31, 76, 82, 0.42)),
    rgba(30, 43, 48, 0.36);
}

.welcome-card {
  width: min(100%, 520px);
  padding: 1.7rem;
  text-align: center;
}

.welcome-card h3 {
  margin: 0.35rem 0 0.65rem;
  font-family: "Source Serif 4", serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
}

.welcome-card .eyebrow {
  justify-content: center;
  margin: 0.85rem 0 0;
  color: var(--success);
}

.welcome-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(237, 246, 242, 0.96);
  border: 1px solid rgba(50, 105, 93, 0.22);
  box-shadow: 0 18px 36px rgba(50, 105, 93, 0.18);
}

.welcome-mark::before {
  content: "";
  width: 1.35rem;
  height: 0.7rem;
  border-left: 3px solid var(--success);
  border-bottom: 3px solid var(--success);
  transform: translateY(-0.12rem) rotate(-45deg);
}

.welcome-action {
  margin: 0.7rem auto 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-rail {
    position: static;
    padding-right: 0;
  }
}

.policy-page {
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    radial-gradient(circle at top left, rgba(221, 232, 234, 0.88), transparent 28%),
    linear-gradient(180deg, #f6f9f8 0%, #edf2f1 100%);
}

.policy-shell {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 28px;
  border: 1px solid rgba(54, 73, 81, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 252, 252, 0.97)),
    var(--panel-image) center/cover no-repeat;
  box-shadow: var(--shadow);
}

.policy-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.policy-shell h1,
.policy-section h2 {
  font-family: "Source Serif 4", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.policy-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.policy-intro,
.policy-section p {
  color: var(--muted);
  line-height: 1.75;
}

.policy-section {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(48, 67, 74, 0.08);
}

.policy-section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.policy-back-link {
  display: inline-block;
  margin-top: 1.8rem;
}

@media (max-width: 720px) {
  .hero-grid {
    padding: 1rem;
  }

  .field {
    padding: 0.8rem;
  }

  .panel-frame {
    border-radius: 22px;
    padding: 1rem;
  }

  .panel-header,
  .section-title-row,
  .form-footer,
  .field-head-inline,
  .modal-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .trust-progress-list {
    grid-template-columns: 1fr;
  }

  .newsletter-row {
    width: 100%;
  }

  .child-account-card,
  .child-account-actions,
  .child-form-actions,
  .doctor-selected,
  .doctor-result-main,
  .doctor-selected-meta {
    grid-template-columns: 1fr;
    display: grid;
  }

  .doctor-results {
    position: static;
    max-height: 14rem;
    box-shadow: none;
  }

  .doctor-clear-btn {
    width: 100%;
  }

  .submit-button {
    width: 100%;
    margin-left: 0;
  }
}

/* -- Validation -- */
.field.field-error input,
.field.field-error select,
.field.field-error textarea {
  border-color: #c0392b;
  background-color: #fff8f8;
}

.field.field-error .field-label {
  color: #c0392b;
}

.field-error-msg {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #c0392b;
  font-weight: 500;
}

.checkbox-row.field-error {
  color: #c0392b;
}

.form-error-summary {
  font-size: 0.85rem;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}


/* -- Phone field -- */
.phone-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.phone-input-row input {
  flex: 1 1 0;
  min-width: 0;
}

.phone-type-wrap {
  position: relative;
}

.phone-type-btn {
  height: 100%;
  padding: 0 0.85rem;
  white-space: nowrap;
  border: 1px solid var(--border, #d4d8e1);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text, #1a1d23);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.phone-type-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.phone-type-wrap .dropdown-menu {
  min-width: 140px;
}

[uib-typeahead-popup].dropdown-menu {
  z-index: 10050;
  display: block;
  max-height: 16rem;
  min-width: 18rem;
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid rgba(41, 93, 107, 0.16);
  border-radius: 16px;
  background: rgba(248, 251, 251, 0.98);
  box-shadow: 0 22px 38px rgba(41, 60, 67, 0.18);
}

[uib-typeahead-popup].dropdown-menu > li > a {
  display: block;
  padding: 0.68rem 0.78rem;
  border-radius: 12px;
  color: var(--text);
  white-space: normal;
}

[uib-typeahead-popup].dropdown-menu > li > a:hover,
[uib-typeahead-popup].dropdown-menu > .active > a,
[uib-typeahead-popup].dropdown-menu > .active > a:hover {
  color: var(--text);
  background: rgba(221, 233, 235, 0.78);
}

