:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #14213d;
  --muted: #667085;
  --line: #e6eaf0;
  --accent: #1570ef;
  --accent-dark: #175cd3;
  --success: #067647;
  --success-bg: #ecfdf3;
  --error: #b42318;
  --error-bg: #fef3f2;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.booking-shell {
  width: min(100% - 24px, 760px);
  margin: 0 auto;
  padding: 28px 0 36px;
}

.clinic-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 20px;
}

.clinic-logo-wrap {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.clinic-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.powered-by {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  line-height: 1.15;
}

.clinic-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.clinic-actions {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.clinic-actions a {
  min-height: 34px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  color: var(--accent-dark);
  background: #fff;
  font-size: .7rem;
  font-weight: 800;
  text-decoration: none;
}

.booking-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

#bookingForm {
  padding: 18px;
}

.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.step:first-of-type {
  padding-top: 4px;
}

.step-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.step-content {
  min-width: 0;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 800;
}

label span {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #fff;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.10);
}

select:disabled {
  color: #98a2b3;
  background: #f9fafb;
}

.split-fields,
.patient-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.book-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.booking-summary {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #b2ddff;
  border-radius: 12px;
  background: #eff8ff;
}

.booking-summary span,
.booking-summary strong,
.booking-summary p {
  display: block;
}

.booking-summary span {
  color: var(--accent-dark);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .07em;
}

.booking-summary strong {
  margin-top: 6px;
  font-size: .82rem;
}

.booking-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .73rem;
}

.book-button:hover {
  background: var(--accent-dark);
}

.book-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.notice {
  margin: 16px 18px 0;
  padding: 12px 13px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.notice.error {
  color: var(--error);
  background: var(--error-bg);
}

.notice.success {
  color: var(--success);
  background: var(--success-bg);
}

.privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
  text-align: center;
}

.booking-confirmation {
  padding: 28px 20px;
  text-align: center;
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: #fff;
  background: #12b76a;
  box-shadow: 0 8px 24px rgba(18, 183, 106, .24);
  font-size: 1.7rem;
  font-weight: 900;
}

.confirmation-label {
  margin: 0;
  color: #067647;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .11em;
}

.booking-confirmation h2 {
  margin: 7px 0 3px;
  color: var(--text);
  font-size: 1.38rem;
}

.confirmation-clinic {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: .82rem;
}

.confirmation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  text-align: left;
}

.confirmation-grid div {
  min-width: 0;
  padding: 14px;
  border-bottom: 1px solid #e4e7ec;
}

.confirmation-grid div:nth-child(odd) { border-right: 1px solid #e4e7ec; }
.confirmation-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.confirmation-grid span,
.confirmation-grid strong { display: block; }
.confirmation-grid span { color: var(--muted); font-size: .66rem; }
.confirmation-grid strong { margin-top: 4px; overflow-wrap: anywhere; color: var(--text); font-size: .8rem; }

.confirmation-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  color: #344054;
  background: #f2f4f7;
  font-size: .72rem;
  line-height: 1.5;
  text-align: left;
}

.confirmation-actions { display: grid; gap: 10px; margin-top: 18px; }
.confirmation-actions .book-button { margin-top: 0; }
@media print {
  .clinic-header, .booking-footer, .confirmation-actions { display: none !important; }
  body { background: #fff; }
  .booking-shell { max-width: 720px; padding: 0; }
  .booking-card { border: 0; box-shadow: none; }
}

.booking-footer {
  padding: 16px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .booking-shell {
    padding-top: 44px;
  }

  #bookingForm {
    padding: 24px;
  }

  .split-fields,
  .patient-grid {
    grid-template-columns: 1fr 1fr;
  }

  .full-field {
    grid-column: 1 / -1;
  }

  .step {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 15px;
    padding: 20px 0;
  }

  .booking-footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .booking-confirmation { padding: 38px 34px; }
  .confirmation-actions { grid-template-columns: 1fr; }
}
