/* Diagnostics booking — shared, branch-aware patient experience */
:root {
  --diag-brand: var(--brand, #125873);
  --diag-accent: var(--admin-accent, #20d0cd);
  --diag-ink: #102a3a;
  --diag-muted: #64748b;
  --diag-line: #dce7ee;
  --diag-soft: #f4f8fb;
  --diag-white: #fff;
  --diag-success: #087f5b;
  --diag-danger: #b42318;
}

.diagnostics-booking-page {
  margin: 0;
  min-height: 100vh;
  color: var(--diag-ink);
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--diag-accent) 14%, transparent), transparent 30rem),
    linear-gradient(180deg, #f8fbfd 0, #eef5f8 100%);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.diagnostics-booking-page *,
.diagnostics-booking-page *::before,
.diagnostics-booking-page *::after {
  box-sizing: border-box;
}

/* Lab header used by diagnostic branches (for example Thyrocare). */
.diagnostics-booking-page header.top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--diag-line);
  box-shadow: 0 4px 22px rgba(15, 50, 70, .06);
  backdrop-filter: blur(12px);
}

.diagnostics-booking-page header.top .wrap {
  width: min(1180px, calc(100% - 32px));
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.diagnostics-booking-page header.top .top-row {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 12px 0 10px;
}

.diagnostics-booking-page header.top .logo-link {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.diagnostics-booking-page header.top .logo-link img {
  display: block;
  width: auto;
  height: 48px;
  max-width: 210px;
  object-fit: contain;
  object-position: left center;
}

.diagnostics-booking-page header.top .search {
  display: flex;
  width: min(590px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cbd9e4;
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(15, 50, 70, .05);
}

.diagnostics-booking-page header.top .pin {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--diag-ink);
  background: #f5f8fa;
  border-right: 1px solid #dbe5eb;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.diagnostics-booking-page header.top .search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  outline: 0;
  background: #fff;
  color: var(--diag-ink);
  font: inherit;
}

.diagnostics-booking-page header.top .search button {
  padding: 0 20px;
  border: 0;
  color: #fff;
  background: var(--diag-brand);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.diagnostics-booking-page header.top .login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  color: var(--diag-brand);
  background: #fff;
  border: 1.5px solid var(--diag-brand);
  border-radius: 11px;
  font-weight: 800;
  text-decoration: none;
}

.diagnostics-booking-page header.top .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 0 0 11px;
}

.diagnostics-booking-page header.top .nav a {
  padding: 5px 0;
  color: #365366;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.diagnostics-booking-page header.top .nav a:hover,
.diagnostics-booking-page header.top .nav a.is-active {
  color: var(--diag-brand);
  border-bottom-color: var(--diag-accent);
}

.booking-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--diag-accent) 55%, transparent), transparent 24rem),
    linear-gradient(118deg, color-mix(in srgb, var(--diag-brand) 88%, #082d42) 0%, var(--diag-brand) 58%, color-mix(in srgb, var(--diag-brand) 75%, var(--diag-accent)) 100%);
}

.booking-hero::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 48px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
  content: "";
}

.booking-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 62px;
}

.booking-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.booking-eyebrow::before {
  width: 28px;
  height: 2px;
  background: var(--diag-accent);
  border-radius: 99px;
  content: "";
}

.booking-hero h1 {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.booking-hero p {
  max-width: 650px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.6;
}

.booking-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 19px;
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 700;
}

.booking-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.booking-trust-row span::before {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: var(--diag-brand);
  background: #fff;
  border-radius: 50%;
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.booking-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: -32px auto 48px;
}

.booking-card {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--diag-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20, 60, 80, .09);
}

.booking-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 12px;
  color: var(--diag-muted);
  border-right: 1px solid var(--diag-line);
  font-size: 13px;
  font-weight: 750;
}

.booking-step:last-child { border-right: 0; }

.booking-step-num {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  color: var(--diag-brand);
  background: color-mix(in srgb, var(--diag-accent) 15%, #fff);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.booking-step.is-current {
  color: var(--diag-brand);
  background: color-mix(in srgb, var(--diag-accent) 6%, #fff);
}

.booking-step.is-current .booking-step-num {
  color: #fff;
  background: var(--diag-brand);
}

.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 20px;
  align-items: start;
}

.booking-panel {
  padding: 24px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--diag-line);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(20, 60, 80, .07);
}

.booking-details-panel {
  position: sticky;
  top: 98px;
}

.booking-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.booking-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--diag-brand), color-mix(in srgb, var(--diag-brand) 58%, var(--diag-accent)));
  border-radius: 12px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--diag-brand) 20%, transparent);
  font-size: 19px;
}

.booking-panel-head h2 {
  margin: 0;
  color: var(--diag-ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.015em;
}

.booking-panel-head p {
  margin: 4px 0 0;
  color: var(--diag-muted);
  font-size: 12px;
  line-height: 1.45;
}

.diagnostics-booking-page .field {
  margin-bottom: 15px;
}

.diagnostics-booking-page .field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: #304a5a;
  font-size: 12px;
  font-weight: 800;
}

.diagnostics-booking-page .field input,
.diagnostics-booking-page .field select,
.diagnostics-booking-page .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--diag-ink);
  background: #fff;
  border: 1px solid #cbdbe5;
  border-radius: 11px;
  outline: 0;
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.diagnostics-booking-page .field textarea {
  min-height: 78px;
  resize: vertical;
}

.diagnostics-booking-page .field input:hover,
.diagnostics-booking-page .field select:hover,
.diagnostics-booking-page .field textarea:hover {
  border-color: #9eb7c6;
}

.diagnostics-booking-page .field input:focus,
.diagnostics-booking-page .field select:focus,
.diagnostics-booking-page .field textarea:focus {
  background: #fff;
  border-color: var(--diag-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--diag-brand) 12%, transparent);
}

.test-search-wrap {
  position: relative;
}

.test-search-wrap::before {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--diag-muted);
  content: "⌕";
  font-size: 23px;
  transform: translateY(-53%);
}

.test-search-wrap #testSearch {
  min-height: 52px;
  padding-left: 45px;
  background: var(--diag-soft);
  border-width: 1.5px;
  font-size: 15px;
}

.search-results {
  min-height: 78px;
  max-height: 290px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--diag-line);
  border-radius: 12px;
}

.search-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f5;
  transition: background .15s ease;
}

.search-hit:hover { background: #f7fafc; }
.search-hit:last-child { border-bottom: 0; }
.search-hit-info { min-width: 0; flex: 1; }

.search-hit-name {
  color: var(--diag-ink);
  font-size: 13px;
  font-weight: 800;
}

.search-hit-meta {
  margin-top: 4px;
  color: var(--diag-muted);
  font-size: 11px;
}

.search-empty {
  display: grid;
  min-height: 76px;
  padding: 18px;
  place-items: center;
  color: var(--diag-muted);
  font-size: 12px;
  text-align: center;
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--diag-brand), color-mix(in srgb, var(--diag-brand) 68%, var(--diag-accent)));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--diag-brand) 22%, transparent);
}

.btn-primary:disabled {
  opacity: .55;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  color: var(--diag-brand);
  background: color-mix(in srgb, var(--diag-accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--diag-brand) 24%, #dbe6ec);
}

.btn-add {
  min-height: 34px;
  padding: 7px 12px;
  color: #fff;
  background: var(--diag-success);
  border-radius: 9px;
  white-space: nowrap;
}

.btn-add.added { background: #526d7b; }

.bill-panel {
  margin-top: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--diag-line);
  border-radius: 14px;
}

.bill-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  color: #fff;
  background: linear-gradient(100deg, var(--diag-brand), color-mix(in srgb, var(--diag-brand) 72%, var(--diag-accent)));
  font-size: 13px;
  font-weight: 800;
}

.bill-panel-head #selCount {
  padding: 4px 9px;
  color: var(--diag-brand);
  background: #fff;
  border-radius: 999px;
  font-size: 10px;
}

.bill-cart-list {
  max-height: 260px;
  overflow: auto;
  background: #fff;
}

.bill-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f5;
  font-size: 12px;
}

.bill-line:last-child { border-bottom: 0; }
.bill-line-name { color: var(--diag-ink); font-weight: 800; }
.bill-line-sub { margin-top: 3px; color: var(--diag-muted); font-size: 10px; }

.bill-qty {
  width: 52px;
  min-height: 34px;
  padding: 5px;
  text-align: center;
  border: 1px solid #cbdbe5;
  border-radius: 8px;
}

.btn-remove {
  padding: 6px 9px;
  color: var(--diag-danger);
  background: #fff5f4;
  border: 1px solid #ffd1cc;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.bill-empty {
  padding: 24px 16px;
  color: var(--diag-muted);
  font-size: 12px;
  text-align: center;
}

.patient-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.patient-fields-grid .field:first-child { grid-column: 1 / -1; }

.collection-options {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px !important;
  margin-top: 4px;
}

.collection-option {
  display: flex !important;
  min-height: 75px;
  align-items: flex-start !important;
  gap: 9px !important;
  padding: 12px;
  color: #365366;
  background: #fff;
  border: 1px solid #d7e3ea;
  border-radius: 11px;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.4;
  cursor: pointer;
}

.collection-option:has(input:checked) {
  color: var(--diag-brand);
  background: color-mix(in srgb, var(--diag-accent) 7%, #fff);
  border-color: var(--diag-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--diag-brand) 8%, transparent);
}

.collection-option input {
  width: 17px !important;
  min-height: 17px !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  accent-color: var(--diag-brand);
}

#homeCollectionBox {
  padding: 14px !important;
  margin: -2px 0 15px !important;
  background: color-mix(in srgb, var(--diag-accent) 6%, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--diag-brand) 22%, #dbe6ec) !important;
  border-radius: 12px !important;
}

.sum {
  padding-top: 16px;
  margin-top: 17px;
  border-top: 1px solid var(--diag-line);
}

.summary-label {
  margin-bottom: 9px;
  color: #304a5a;
  font-size: 12px;
  font-weight: 800;
}

.bill-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 14px 15px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--diag-accent) 10%, #fff), #fff);
  border: 1px solid color-mix(in srgb, var(--diag-brand) 20%, #dbe6ec);
  border-radius: 13px;
}

.bill-summary-left {
  flex: 1;
  color: var(--diag-success);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.bill-summary-right {
  color: var(--diag-brand);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.bill-summary-right .full-amt {
  display: block;
  color: var(--diag-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: line-through;
}

.bill-summary-right .pay-amt { display: block; }

.actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.actions #submitBtn {
  width: 100%;
  min-height: 48px;
  font-size: 13px;
}

.clear-bill-link {
  padding: 8px 0;
  color: var(--diag-muted);
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.msg {
  display: none;
  padding: 11px 13px;
  margin-top: 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.ok { color: #166534; background: #ecfdf3; border: 1px solid #a7e5bd; }
.err { color: #991b1b; background: #fff1f0; border: 1px solid #ffc6c0; }

.offer-card {
  padding: 13px;
  margin-bottom: 9px;
  background: color-mix(in srgb, var(--diag-accent) 6%, #fff);
  border: 1px solid var(--diag-line);
  border-radius: 12px;
}

#specialPackagesBox > .card {
  padding: 18px !important;
  margin-bottom: 18px !important;
  background: #fff;
  border: 1px solid var(--diag-line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 60, 80, .06);
}

.confirm-box {
  display: none;
  padding: 24px;
  margin-bottom: 18px;
  color: #14532d;
  background: #ecfdf5;
  border: 1px solid #86dba8;
  border-radius: 17px;
  box-shadow: 0 14px 36px rgba(22, 101, 52, .1);
}

.confirm-box.show { display: block; }
.confirm-box h2 { margin: 0 0 12px; color: #166534; font-size: 22px; }
.confirm-row { margin: 7px 0; font-size: 13px; line-height: 1.5; }
.confirm-booking-no { color: var(--diag-brand); font-size: 21px; font-weight: 900; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.booking-form-hidden { opacity: .35; pointer-events: none; }

.booking-otp-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.booking-otp-modal.show { display: flex; }
.booking-otp-overlay { position: absolute; inset: 0; background: rgba(7, 26, 39, .62); backdrop-filter: blur(5px); }

.booking-otp-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 24px;
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.booking-otp-card h3 { margin: 0 0 8px; color: var(--diag-brand); font-size: 21px; }
.booking-otp-card p { margin: 0 0 13px; color: var(--diag-muted); font-size: 13px; line-height: 1.5; }
.booking-otp-row { display: flex; gap: 8px; margin: 12px 0; }
.booking-otp-row input { flex: 1; min-width: 0; padding: 12px; border: 1px solid #cbdbe5; border-radius: 10px; font: inherit; }
.booking-otp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-otp-msg { min-height: 18px; margin-top: 10px; font-size: 12px; }

@media (max-width: 900px) {
  .diagnostics-booking-page header.top .top-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .diagnostics-booking-page header.top .search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .diagnostics-booking-page header.top .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  .diagnostics-booking-page header.top .nav a { white-space: nowrap; }
  .booking-grid { grid-template-columns: 1fr; }
  .booking-details-panel { position: static; }
}

@media (max-width: 620px) {
  .diagnostics-booking-page header.top .wrap,
  .booking-hero-inner,
  .booking-wrap {
    width: min(100% - 22px, 1180px);
  }
  .diagnostics-booking-page header.top .logo-link img {
    height: 42px;
    max-width: 175px;
  }
  .diagnostics-booking-page header.top .login { padding: 8px 12px; font-size: 12px; }
  .diagnostics-booking-page header.top .pin { display: none; }
  .diagnostics-booking-page header.top .search button { padding: 0 14px; }
  .booking-hero-inner { padding: 30px 0 52px; }
  .booking-hero h1 { font-size: 29px; }
  .booking-hero p { font-size: 13px; }
  .booking-progress { grid-template-columns: 1fr; }
  .booking-step {
    min-height: 45px;
    justify-content: flex-start;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--diag-line);
  }
  .booking-step:last-child { border-bottom: 0; }
  .booking-panel { padding: 18px 15px; border-radius: 15px; }
  .patient-fields-grid { grid-template-columns: 1fr; }
  .patient-fields-grid .field:first-child { grid-column: auto; }
  .collection-options { grid-template-columns: 1fr; }
  .bill-line { grid-template-columns: minmax(0, 1fr) auto; }
  .bill-line .bill-qty { grid-column: 1; }
  .bill-line .btn-remove { grid-column: 2; }
  .actions { grid-template-columns: 1fr; }
  .actions .clear-bill-link { order: 2; }
  .booking-otp-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .diagnostics-booking-page * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
