/* Consultation Slot Booking — "Appointment Ledger" theme */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Noto+Sans+Bengali:wght@400;500;600;700;800&display=swap');

.csb-wrap {
  --csb-ink: #16231d;
  --csb-ink-soft: #4d5a4f;
  --csb-ink-faint: #7c8880;
  --csb-paper: #fdfbf6;
  --csb-paper-dim: #f3f0e6;
  --csb-brass: #d89912;
  --csb-brass-dark: #9d6805;
  --csb-gold-gradient: linear-gradient(135deg, #ffd700 0%, #d89912 100%);
  --csb-sage: #4f7358;
  --csb-sage-bg: #e8efe6;
  --csb-line: #e2dcc9;
  --csb-danger: #a8402b;
  --csb-danger-bg: #fbebe6;
  --csb-shadow: 0 24px 48px -28px rgba(22, 35, 29, .45);
  --csb-radius: 18px;
  --csb-font-display: 'Noto Sans Bengali', 'Segoe UI', sans-serif;
  --csb-font-body: 'Noto Sans Bengali', 'Segoe UI', sans-serif;
  --csb-font-numeric: 'Manrope', 'Noto Sans Bengali', sans-serif;

  max-width: 720px;
  margin: 32px auto;
  font-family: var(--csb-font-body);
  color: var(--csb-ink);
  -webkit-font-smoothing: antialiased;
}

.csb-wrap *, .csb-wrap *::before, .csb-wrap *::after { box-sizing: border-box; }

.csb-card {
  background: var(--csb-paper);
  border: 1px solid var(--csb-line);
  border-radius: var(--csb-radius);
  box-shadow: var(--csb-shadow);
  overflow: hidden;
  animation: csb-rise .5s ease both;
}
@keyframes csb-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .csb-card { animation: none; } }

/* Header */
.csb-head { padding: 30px 32px 8px; }
.csb-eyebrow {
  font-family: var(--csb-font-body);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--csb-brass-dark);
  margin: 0 0 8px;
}
.csb-title {
  font-family: var(--csb-font-display);
  font-weight: 800;
  font-size: 29px;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--csb-ink);
}

/* Ticket-stub progress rail */
.csb-rail {
  list-style: none;
  display: flex;
  margin: 22px 0 0;
  padding: 0 32px;
  position: relative;
}
.csb-rail::before {
  content: "";
  position: absolute;
  left: 32px; right: 32px; top: 15px;
  height: 0;
  border-top: 2px dashed var(--csb-line);
}
.csb-rail-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.csb-rail-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--csb-paper);
  border: 2px solid var(--csb-line);
  font-family: var(--csb-font-numeric);
  font-weight: 600;
  font-size: 13px;
  color: var(--csb-ink-faint);
  transition: border-color .25s, color .25s, background .25s;
}
.csb-rail-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--csb-ink-faint);
  letter-spacing: .01em;
}
.csb-rail-step.is-active .csb-rail-dot,
.csb-rail-step.is-done .csb-rail-dot {
  border-color: var(--csb-brass);
  color: #fff;
  background: var(--csb-gold-gradient);
}
.csb-rail-step.is-active .csb-rail-name,
.csb-rail-step.is-done .csb-rail-name { color: var(--csb-ink); }
.csb-rail-step.is-done .csb-rail-dot::after { content: "✓"; }
.csb-rail-step.is-done .csb-rail-dot { font-size: 0; }
.csb-rail-step.is-done .csb-rail-dot::after { font-size: 14px; }

/* Form / steps */
.csb-form { padding: 24px 32px 32px; }
.csb-step { display: none; animation: csb-fade .35s ease both; }
.csb-step.is-active { display: block; }
@keyframes csb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .csb-step { animation: none; } }

.csb-step h3 {
  font-family: var(--csb-font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--csb-ink);
  outline: none;
}

/* Banner (status / errors) */
.csb-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--csb-sage-bg);
  color: var(--csb-sage);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 18px;
}
.csb-banner.is-error { background: var(--csb-danger-bg); color: var(--csb-danger); }
.csb-banner[hidden] { display: none; }
.csb-banner-icon { flex: none; line-height: 1.4; }

/* Package cards */
.csb-packages { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.csb-package { cursor: pointer; display: block; }
.csb-package input { position: absolute; opacity: 0; width: 0; height: 0; }
.csb-package-card {
  display: block;
  padding: 18px;
  border: 2px solid var(--csb-line);
  border-radius: 14px;
  background: var(--csb-paper);
  transition: border-color .2s, background .2s, transform .15s;
  position: relative;
}
.csb-package-card:hover { border-color: var(--csb-brass); transform: translateY(-2px); }
.csb-package input:checked + .csb-package-card {
  border-color: var(--csb-brass);
  background: linear-gradient(135deg, #fffdf3 0%, #fff5cf 100%);
  box-shadow: 0 12px 22px -18px rgba(216, 153, 18, .85);
}
.csb-package input:focus-visible + .csb-package-card { outline: 2px solid var(--csb-brass); outline-offset: 3px; }
.csb-package input:checked + .csb-package-card::after {
  content: "নির্বাচিত";
  position: absolute; top: 0; right: 14px;
  padding: 4px 9px 5px;
  border-radius: 0 0 8px 8px;
  background: var(--csb-gold-gradient);
  color: #3d2b00;
  font-family: var(--csb-font-numeric);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.csb-package-title { display: block; font-family: var(--csb-font-display); font-weight: 700; font-size: 17px; }
.csb-package-price {
  display: block;
  font-family: var(--csb-font-numeric);
  font-variant-numeric: tabular-nums;
  color: #6f4900;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 8px 0;
}
.csb-package-desc { display: block; color: var(--csb-ink-soft); font-size: 13px; line-height: 1.4; }

/* Date chips */
.csb-date-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.csb-date-scroll::-webkit-scrollbar { height: 6px; }
.csb-date-scroll::-webkit-scrollbar-thumb { background: var(--csb-line); border-radius: 3px; }
.csb-date-chip {
  scroll-snap-align: start;
  flex: none;
  width: 62px;
  padding: 10px 0 8px;
  text-align: center;
  border: 2px solid var(--csb-line);
  border-radius: 12px;
  background: var(--csb-paper);
  cursor: pointer;
  font-family: var(--csb-font-body);
  transition: border-color .2s, background .2s;
}
.csb-date-chip:hover { border-color: var(--csb-brass); }
.csb-date-chip.is-selected { border-color: var(--csb-brass); background: var(--csb-gold-gradient); color: #3d2b00; box-shadow: 0 8px 16px -12px rgba(216, 153, 18, .9); }
.csb-date-chip.is-selected .csb-date-chip-day,
.csb-date-chip.is-selected .csb-date-chip-num { color: #3d2b00; }
.csb-date-chip-day { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--csb-ink-faint); }
.csb-date-chip-num { display: block; font-family: var(--csb-font-numeric); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; margin-top: 2px; }
.csb-date-more {
  margin: 4px 0 18px;
  font-size: 13px;
  color: var(--csb-ink-soft);
}
.csb-date-more summary { cursor: pointer; color: var(--csb-brass-dark); font-weight: 600; list-style: none; }
.csb-date-more summary::-webkit-details-marker { display: none; }
.csb-date-more input[type=date] {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--csb-line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

/* Time rail */
.csb-period { margin-bottom: 6px; }
.csb-period-label {
  font-family: var(--csb-font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--csb-ink-faint);
  margin: 14px 0 8px;
}
.csb-slot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.csb-slot {
  border: 1.5px solid var(--csb-line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--csb-font-numeric);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: var(--csb-ink);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .12s;
}
.csb-slot:hover { border-color: var(--csb-brass); transform: translateY(-1px); }
.csb-slot[aria-pressed="true"] { background: var(--csb-gold-gradient); border-color: var(--csb-brass); color: #3d2b00; }
.csb-slot-empty, .csb-slot-loading {
  font-size: 13px;
  color: var(--csb-ink-soft);
  padding: 14px 0;
}
.csb-slot-status { min-height: 20px; font-size: 13px; color: var(--csb-sage); margin-top: 10px; font-weight: 500; }

/* Detail inputs */
.csb-field { margin-bottom: 16px; }
.csb-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--csb-ink); }
.csb-field .csb-optional { font-weight: 400; color: var(--csb-ink-faint); }
.csb-field input {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--csb-line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--csb-ink);
  transition: border-color .18s, box-shadow .18s;
}
.csb-field input:focus-visible {
  outline: none;
  border-color: var(--csb-brass);
  box-shadow: 0 0 0 3px rgba(184, 134, 59, .18);
}
.csb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Review / summary */
.csb-summary {
  border: 1px dashed var(--csb-line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 20px;
  background: var(--csb-paper-dim);
}
.csb-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--csb-line); font-size: 14px; }
.csb-summary-row:last-child { border-bottom: 0; }
.csb-summary-row dt { color: var(--csb-ink-soft); }
.csb-summary-row dd { margin: 0; font-weight: 600; text-align: right; }
.csb-summary-row.csb-summary-total dd { font-family: var(--csb-font-numeric); font-variant-numeric: tabular-nums; color: var(--csb-brass-dark); font-size: 17px; font-weight: 800; }

/* Actions */
.csb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.csb-btn {
  border: 0;
  border-radius: 10px;
  padding: 13px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, opacity .18s, background .18s;
}
.csb-btn:active { transform: translateY(1px); }
.csb-btn-primary { background: var(--csb-gold-gradient); color: #3d2b00; margin-left: auto; box-shadow: 0 8px 16px -10px rgba(216, 153, 18, .9); }
.csb-btn-primary:hover { background: linear-gradient(135deg, #ffe34e 0%, #d89912 100%); }
.csb-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.csb-btn-ghost { background: transparent; color: var(--csb-ink-soft); padding: 13px 6px; }
.csb-btn-ghost:hover { color: var(--csb-ink); }
.csb-btn-ghost.csb-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
}
.csb-btn-ghost.csb-back:hover { color: var(--csb-ink-soft); }
.csb-back-icon { display: block; }
.csb-btn-pay::after { content: " →"; }
.csb-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  border-radius: 50%; animation: csb-spin .7s linear infinite; margin-right: 8px; vertical-align: -2px;
}
@keyframes csb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .csb-spinner { animation: csb-spin 1.4s linear infinite; } }

.csb-fineprint { font-size: 12px; color: var(--csb-ink-faint); margin-top: 6px; }
.csb-agree { margin-top: 14px; }
.csb-agree-label { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; font-size: 11px; color: var(--csb-ink-soft); line-height: 1.45; }
.csb-agree-label input[type="checkbox"] { margin-top: 1px; width: 20px; height: 20px; flex: none; accent-color: var(--csb-brass); cursor: pointer; }
.csb-agree-label a { font-size: inherit; color: var(--csb-brass-dark); font-weight: 600; text-decoration: underline; }
.csb-terms-error { margin: 6px 0 0; font-size: 11px; color: #b42318; }
@media (max-width: 480px) {
  .csb-agree-label { font-size: 10px; gap: 5px; }
}

@media (max-width: 560px) {
  .csb-wrap { margin: 0 auto; border-radius: 0; }
  .csb-head, .csb-form { padding-left: 18px; padding-right: 18px; }
  .csb-rail { padding: 0 18px; }
  .csb-rail::before { left: 18px; right: 18px; }
  .csb-packages, .csb-field-row { grid-template-columns: 1fr; }
  .csb-rail-name { display: none; }
}

/* Locked / already-booked slots: replace the time text with a lock, matching the reference UI. */
.csb-slot.is-locked,
.csb-slot.is-locked:hover,
.csb-slot.is-locked:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: var(--csb-gold-gradient);
  border-color: var(--csb-brass);
  color: #173e9f;
  transform: none;
  box-shadow: none;
}
.csb-slot.is-locked {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-width: 90px;
  height: 41px;
  min-height: 41px;
  padding: 0;
}
.csb-slot.is-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.csb-slot-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}
.csb-slot-lock svg {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}
.csb-lock-shackle {
  fill: none;
  stroke: #0b45c4;
  stroke-width: 2.8;
  stroke-linecap: round;
}
.csb-lock-body {
  fill: #0b45c4;
}
.csb-lock-keyhole {
  fill: #ffd21a;
}
.csb-lock-keyline {
  fill: none;
  stroke: #ffd21a;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.csb-slot-time { font-variant-numeric: tabular-nums; }
.csb-slot-booked { display: none; }

/* v1.4.4: keep the booked-slot lock visible even when browser/theme styles affect disabled buttons. */
.csb-slot.is-locked .csb-slot-lock,
.csb-slot.is-locked .csb-slot-lock svg {
  opacity: 1 !important;
  visibility: visible !important;
}
.csb-slot.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
