/* =============================================================
   prescreen.css — Wireframe layout for the v2 patient pre-screen
   Loaded exclusively by patient-prescreen-v2.php layout.
   Bootstrap 5 is still loaded as the grid/form-control base.
   ============================================================= */

/* ── Custom properties (accent injected by layout via inline style) ── */
:root {
  /* ── Basic ── */
  --ps-foreground: #001a25;
  --ps-background: #ffffff;
  --ps-neutral-dark: #2e454e;
  --ps-primary: #0078c3;
  --ps-primary-light: #e6f2f9;
  --ps-primary-soft: #f2f9fa;

  --ps-black: #001a25;
  --ps-white: #ffffff;
  --ps-neutral-lightest: #f2f9fa;
  --ps-neutral-light: #e2e5eb;
  --ps-neutral: #d1d5db;

  --ps-card-bg: #ffffff;
  --ps-muted: #6b7280;

  --ps-header-height: 72px;
  --ps-radius: 8px;

  /* ── Alert colours ── */
  --ps-danger-bg: #fef2f2;
  --ps-danger-border: #fecaca;
  --ps-danger-text: #991b1b;

  --ps-warning-bg: #fffbeb;
  --ps-warning-border: #fde68a;
  --ps-warning-text: #92400e;

  --ps-info-bg: #eff6ff;
  --ps-info-border: #bfdbfe;
  --ps-info-text: #1e40af;

  --ps-success-bg: #f0fdf4;
  --ps-success-border: #bbf7d0;
  --ps-success-text: #166534;

  /* ── Alert component colours (renderAlert) ── */
  --ps-comp-warning-bg: #fffaea;
  --ps-comp-warning-border: #efc128;

  --ps-comp-info-bg: #eef6fc;
  --ps-comp-info-border: #0078ce;

  --ps-comp-success-bg: #ccf4e2;
  --ps-comp-success-border: #00c670;

  --ps-comp-danger-bg: #ffeaed;
  --ps-comp-danger-border: #ef2840;

  /* ── Validation error ── */
  --ps-error-border: #e11d48;
  --ps-error-bg: #fff7f7;
}

/* ── Reset / base ── */
body.ps-body {
  background-color: var(--ps-primary-soft);
  color: var(--ps-foreground);
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Sticky header ── */
.ps-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  height: var(--ps-header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 64px;
}

.ps-header-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ps-neutral);
  display: none;
}

.ps-header-progress-fill {
  height: 100%;
  background: var(--ps-primary);
}

@media (width > 40rem) {
  .ps-header-progress {
    display: block;
  }
}

.ps-step-complete .ps-header-progress-fill,
.ps-step-complete #ps-progress-fill {
  background: #00c670;
}

.ps-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 100%;
  overflow: hidden;
}

.ps-header-inner-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 100%;
  width: 100%;
}

.ps-header-left {
  overflow: hidden;
  min-width: 0;
}

.ps-header-user-btn {
  align-items: center;
  background: white;
  border: none;
  border-radius: 1.5rem;
  color: var(--ps-foreground);
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 0.25rem;
}

.ps-header-user-btn:focus-visible,
.ps-header-user-btn:hover {
  background: var(--ps-neutral-lightest);
}

.ps-header-user-btn::after {
  display: none;
}

.ps-header-dropdown {
  min-width: 160px;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.ps-header-patient {
  padding-right: 0.5rem;
}

.ps-header-initials {
  background: var(--ps-primary-light);
  color: var(--ps-primary);
  padding: 0.25rem;
  border-radius: 100%;
  font-weight: 700;
  font-size: 0.875rem;
  height: 32px;
  width: 32px;
  text-align: center;
  display: flex;
}

.ps-header-logo {
  max-height: 52px;
  max-width: 150px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (width <=40rem) {
  .ps-header-logo {
    max-height: 44px;
  }
}

.ps-header-vdivider {
  width: 1px;
  align-self: stretch;
  background: var(--ps-neutral);
  flex-shrink: 0;
}

.ps-header-logo-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ps-foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

.ps-header-divider {
  color: var(--ps-neutral);
  border-left: #16a34a 1px solid;
}

.ps-header-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

.ps-header-service {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ps-neutral-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-header-step {
  font-size: 0.8rem;
  color: var(--ps-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (width <=40rem) {
  .ps-header {
    display: none;
  }
}

/* ── Mobile sticky step title ── */
#ps-mobile-title {
  display: none;
}

@media (width <=40rem) {
  #ps-mobile-title {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: #ffffff;
    border-bottom: 1px solid var(--ps-neutral);
    padding: 0.75rem 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  #ps-mobile-title.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  #ps-mobile-title-text {
    font-family: Inter, sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 130%;
    letter-spacing: 0%;
    color: var(--ps-foreground);
  }
}

/* ── Mobile top progress bar ── */
#ps-progress {
  display: none;
}

@media (width <= 40rem) {
  #ps-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 101;
    background: var(--ps-neutral);
    display: block;
  }

  #ps-progress-fill {
    height: 100%;
    background: var(--ps-primary);
  }

  #ps-mobile-title {
    top: 3px;
  }
}

/* ── Main content area ── */
.ps-main {
  padding: 2rem 1rem 4rem;
}

@media (width <=40rem) {
  .ps-main {
    padding: 0;
  }
}

/* ── Card (one per step) ── */
.ps-card {
  background: var(--ps-card-bg);
  border-radius: var(--ps-radius);
  padding: 2rem;
  max-width: 712px;
  margin: 0 auto;
  box-shadow: 1px 2px 4px 0px #1623191A;
}

.ps-card.xl {
  max-width: 966px;
}

@media (max-width: 576px) {
  .ps-card {
    padding: 1.25rem;
  }
}

/* ── Typography ── */
.ps-card h1,
.ps-card .ps-heading {
  font-size: 1.375rem;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ps-foreground);
  font-style: Bold;
  line-height: 120%;
  letter-spacing: 0%;
}

@media (width <=40rem) {

  .ps-card h1,
  .ps-card .ps-heading {
    font-size: 1.75rem;
  }
}

.ps-card h2,
.ps-card .ps-heading-2 {
  font-weight: 700;
  font-style: Bold;
  font-size: 2rem;
  line-height: 130%;
  letter-spacing: 0%;
}

@media (width <=40rem) {

  .ps-card h2,
  .ps-card .ps-heading-2 {
    font-size: 1.5rem;
    line-height: 120%;
  }
}

.ps-card h3,
.ps-card .ps-heading-3 {
  font-weight: 700;
  font-style: Bold;
  font-size: 1.5rem;
  line-height: 120%;
  letter-spacing: 0%;
}

@media (width <=40rem) {

  .ps-card h3,
  .ps-card .ps-heading-3 {
    font-size: 1.5rem;
  }
}

.ps-card h4,
.ps-card .ps-heading-4 {
  font-weight: 700;
  font-style: Bold;
  font-size: 1.5rem;
  line-height: 130%;
  letter-spacing: 0%;
}

@media (width <=40rem) {

  .ps-card h4,
  .ps-card .ps-heading-4 {
    font-weight: 700;
    font-style: Bold;
    font-size: 1.125rem;
    line-height: 120%;
  }
}

.ps-card h2,
.ps-card .ps-subheading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--ps-foreground);
}

.ps-card .ps-description {
  font-weight: 400;
  font-size: 1rem;
  line-height: 150%;
  letter-spacing: 0%;
  color: var(--ps-neutral-dark);
}

.ps-card p {
  font-weight: 400;
  font-size: 1rem;
  line-height: 150%;
  letter-spacing: 0%;
  color: var(--ps-neutral-dark);
}

/* ── Divider ── */
.ps-divider {
  border: none;
  border-top: 1px solid var(--ps-neutral);
  margin: 1.5rem 0;
}

/* ── Primary button ── */
.ps-btn-primary {
  display: inline-block;
  background-color: var(--ps-foreground);
  color: #ffffff;
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: center;
  letter-spacing: 0%;
  transition: background 0.15s ease, color 0.15s ease;
}

.ps-btn-primary:hover,
.ps-btn-primary:focus,
.ps-btn-primary:focus-visible {
  background-color: var(--ps-primary);
  color: white;
  text-decoration: none;
}

.ps-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Secondary / outline button ── */
.ps-btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--ps-foreground);
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  width: 100%;
  text-align: center;
  letter-spacing: 0%;
}

.ps-btn-secondary:hover,
.ps-btn-secondary:focus,
.ps-btn-secondary:focus-visible {
  background-color: var(--ps-primary-light);
  color: var(--ps-foreground);
  text-decoration: none;
}

.ps-btn-underline {
  display: inline-block;
  background-color: transparent;
  color: var(--ps-foreground);
  border-radius: var(--ps-radius);
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  width: 100%;
  text-align: center;
  letter-spacing: 0%;
}

/* ── Button size variants ── */
.ps-btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
}

.ps-btn-xs {
  padding: 0rem 0rem;
  font-size: 0.875rem;
  border-radius: 4px;
  outline-offset: 2px;
}

/* ── Form elements ── */
.ps-label {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 0%;
  color: var(--ps-foreground);
}

.ps-field-desc {
  font-size: 0.875rem !important;
  color: var(--ps-muted);
  line-height: 150%;
  letter-spacing: 0%;
  margin: 0;
}

.ps-input,
.ps-select,
.ps-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  font-size: 1rem;
  color: var(--ps-foreground);
  background-color: #ffffff;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.ps-input:hover,
.ps-select:hover,
.ps-textarea:hover {
  border-color: var(--ps-primary);
}

.ps-input:focus,
.ps-select:focus,
.ps-textarea:focus {
  border-color: var(--ps-neutral)
}

.ps-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.ps-form-group {
  margin-bottom: 1.5rem;
}

/* ── Checkbox / Radio ── */
.ps-check-label,
.ps-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ps-foreground);
}

.ps-radio-label input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ps-check-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid var(--ps-neutral);
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ps-check-label input[type="checkbox"]:checked {
  background-color: #0078c3;
  border-color: #0078c3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5,8 6,11.5 13.5,4.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

/* ── Alert component (renderAlert() compatibility) ── */
.custom-bg-warning-light {
  background-color: var(--ps-comp-warning-bg);
}

.custom-bg-info {
  background-color: var(--ps-comp-info-bg);
}

.custom-bg-success {
  background-color: var(--ps-comp-success-bg);
}

.custom-bg-danger {
  background-color: var(--ps-comp-danger-bg);
}

.custom-border-warning {
  border: 1px solid var(--ps-comp-warning-border) !important;
}

.custom-border-info {
  border: 1px solid var(--ps-comp-info-border) !important;
}

.custom-border-success {
  border: 1px solid var(--ps-comp-success-border) !important;
}

.custom-border-danger {
  border: 1px solid var(--ps-comp-danger-border) !important;
}

/* ── Legacy component utilities (.text-4, .a-primary) ── */
.text-4 {
  font-size: 0.875rem;
  line-height: 1.5;
}

.a-primary {
  color: var(--ps-foreground);
  font-weight: 700;
  text-underline-offset: 0.25rem;
  text-decoration: underline var(--ps-comp-success-border);
}

.a-primary:hover {
  text-decoration: underline var(--ps-foreground);
  color: var(--ps-foreground);
}

a.a-plain {
  color: var(--ps-foreground);
}

a.a-muted {
  color: var(--ps-muted);
}

/* ── Alert / feedback ── */
.ps-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.ps-alert-danger {
  background: var(--ps-danger-bg);
  border: 1px solid var(--ps-danger-border);
  color: var(--ps-danger-text);
}

.ps-alert-warning {
  background: var(--ps-warning-bg);
  border: 1px solid var(--ps-warning-border);
  color: var(--ps-warning-text);
}

.ps-alert-info {
  background: var(--ps-info-bg);
  border: 1px solid var(--ps-info-border);
  color: var(--ps-info-text);
}

.ps-alert-success {
  background: var(--ps-success-bg);
  border: 1px solid var(--ps-success-border);
  color: var(--ps-success-text);
}

/* ── Summary panel (used on confirm + complete) ── */
.ps-summary {
  background: #f9fafb;
  border: 1px solid var(--ps-neutral);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.ps-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.ps-summary-row+.ps-summary-row {
  border-top: 1px solid var(--ps-neutral);
}

.ps-summary-label {
  color: var(--ps-muted);
  flex-shrink: 0;
  margin-right: 1rem;
}

.ps-summary-value {
  font-weight: 600;
  text-align: right;
}

.ps-price-large {
  font-size: 1.75rem;
  font-weight: 700;
}

/* ── Pharmacy grid ── */
.ps-pharmacy-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ps-pharmacy-grid form {
  margin-bottom: 0;
}

.ps-pharmacy-label {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 140%;
  letter-spacing: 0%;
}

@media (width <=40rem) {
  .ps-pharmacy-label {
    font-size: 0.875rem;
  }
}

/* ── Pharmacy card ── */
.ps-pharmacy-card {
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  padding: 1.125rem 1.25rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.ps-pharmacy-card:focus-visible,
.ps-pharmacy-card:hover {
  border-color: var(--ps-primary);
  background: var(--ps-neutral-lightest);
}

.ps-pharmacy-card:focus-within {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

.ps-pharmacy-card.is-selected {
  border-color: var(--ps-primary);
  background: var(--ps-neutral-lightest);
}

.ps-pharmacy-card .ps-pharmacy-card-label {
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 150%;
  letter-spacing: 0%;
  margin-bottom: 0rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ps-pharmacy-card .ps-pharmacy-card-name {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 140%;
  letter-spacing: 0%;
  margin-bottom: 0rem;
}

.ps-pharmacy-card .ps-pharmacy-card-distance {
  font-weight: 500;
  font-size: 1rem;
  line-height: 150%;
  letter-spacing: 0%;
}

/* ── Pharmacy card opening hours ── */
.ps-pharmacy-hours {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
}

.ps-pharmacy-hours-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 0.875rem;
  color: var(--ps-muted);
}

.ps-pharmacy-hours-day {
  color: var(--ps-foreground);
}

.ps-pharmacy-card .ps-map-full {
  width: 100%;
  height: 13.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* ── Timeslot pills ── */
#timeslots {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 8px;
}

.ps-slot {
  width: 6rem;
  height: 2.875rem;
  border-radius: 2.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ps-neutral);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  color: var(--ps-foreground);
  background: transparent;
}

.ps-slot:hover,
.ps-slot:focus-visible,
.ps-slot.is-selected {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
  color: #ffffff;
  outline: none;
}

/* ── Choice pills (Yes/No radio groups) ── */
.ps-choice-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  height: 2.875rem;
  border-radius: 2.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ps-neutral);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  color: var(--ps-foreground);
  background: transparent;
  user-select: none;
}

.ps-choice-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ps-choice-pill:has(input:checked) {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
  color: #ffffff;
}

.ps-choice-pill:focus-within {
  outline: 0.125rem solid var(--ps-primary);
  outline-offset: 0.125rem;
}

/* ── Choose availability ── */
.ps-availability-header {
  font-size: 1.5rem;
  line-height: 130%;
  letter-spacing: 0%;
}

@media(width <=40rem) {
  .ps-availability-header {
    font-weight: 700;
    font-style: Bold;
    font-size: 1.125rem;
    line-height: 120%;
    letter-spacing: 0%;
  }
}

/* ── Calendar overrides (FullCalendar) ── */

.fc {
  --fc-border-color: transparent;
  --fc-highlight-color: transparent;
}

.fc-daygrid-day,
.fc-daygrid-day-number {
  cursor: default;
}

.fc-day-other,
.fc-day-past {
  opacity: 0.25;
  pointer-events: none;
}

.fc-toolbar-title {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 130%;
  letter-spacing: 0%;
  padding-left: 1rem;
}

@media (width <=40rem) {

  .fc-toolbar-title {
    font-size: 1.125rem !important;
    line-height: 120%;
    padding-left: 0rem;
  }
}

.fc .fc-button-group {
  display: flex;
  gap: 0.5rem;
  padding-right: 1rem;
}

.fc .fc-button {
  background: transparent !important;
  border: 1px solid var(--ps-neutral) !important;
  box-shadow: none !important;
  color: var(--ps-foreground) !important;
  border-radius: 100% !important;
  padding: 4px !important;
  display: flex;
  align-items: center;
}

.fc .fc-button:hover {
  opacity: 0.5;
  background: var(--ps-neutral-lightest) !important;
  border-radius: 100% !important;
}

.fc .fc-button:focus-visible {
  outline: 0.125rem solid var(--ps-primary) !important;
  outline-offset: 0.125rem !important;
  border-radius: 100% !important;
  box-shadow: none !important;
}

.fc .fc-button:active,
.fc .fc-button:not(:disabled):active {
  background: var(--ps-neutral) !important;
  border-radius: var(--ps-radius) !important;
  box-shadow: none !important;
  color: var(--ps-foreground) !important;
}

.fc-col-header-cell-cushion {
  font-weight: 400;
  text-decoration: none;
  color: var(--ps-muted);
}

@media (width <=40rem) {
  .fc-col-header-cell-cushion {
    font-size: 0.75rem;
  }
}

.fc-daygrid-day-frame {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-daygrid-day-top {
  justify-content: center;
}

.fc-daygrid-day-number {
  text-decoration: none;
  color: var(--ps-foreground);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 140%;
  letter-spacing: 0%;
  text-align: center;
  width: clamp(2rem, 6vw, 3.75rem);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

@media (width <=40rem) {
  .fc-daygrid-day-number {
    font-size: 0.875rem;
    line-height: 120%;
    width: clamp(2.75rem, 10vw, 2.5rem);
  }
}

.fc-day-today {
  background: transparent !important;
}

.fc-day-today .fc-daygrid-day-number {
  color: var(--ps-primary);
  font-weight: 600;
}

.selected-date {
  background: transparent !important;
}

.selected-date .fc-daygrid-day-number {
  background: var(--ps-primary);
  color: var(--ps-white) !important;
}

/* ── Room picker (channel selection) ── */
.ps-selected-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--ps-radius);
  background: var(--ps-neutral-lightest);
}

.ps-selected-room-row .ps-room-label {
  font-weight: 400;
  font-size: 1rem;
  line-height: 150%;
  letter-spacing: 0%;
  margin-bottom: 0.5rem;
}

.ps-selected-room-row .ps-room-name {
  font-family: Inter;
  font-weight: 600;
  font-style: Semi Bold;
  font-size: 16px;
  line-height: 140%;
}

.ps-room-row {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
}

.ps-room-row * .ps-room-label {
  font-weight: 600;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0%;
}

.ps-room-row * .ps.room-description {
  font-weight: 400;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0%;
  color: var(--ps-neutral-dark)
}

.ps-room-row:hover {
  background: var(--ps-primary-light);
}

.ps-room-row.is-active {
  background: var(--ps-primary-light);
}

.ps-room-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ps-muted);
}

.ps-room-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Complete / success ── */
.ps-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: #16a34a;
}

.ps-reference {
  font-weight: 700;
  font-style: Bold;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 25%;
  word-break: break-all;
}

@media (width <=40rem) {
  .ps-reference {
    font-size: 1.5rem;
    line-height: 120%;
  }
}

.ps-reference:hover {
  color: var(--ps-primary);
  cursor: pointer;
}

/* ── Inner card (used on complete page) ── */
.ps-inner-card {
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  padding: 1.25rem;
}

/* ── Text utilities ── */
.ps-text-muted {
  font-size: 0.875rem;
  color: var(--ps-muted);
}

/* ── DOB date picker grid ── */
.ps-dob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

/* ── Flash messages ── */
.ps-flash {
  max-width: 966px;
  margin: 0 auto 1.5rem;
}

/* ── Footer ── */
.ps-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.78rem;
  color: var(--ps-muted);
  margin-top: auto;
}

/* ── GP suggest dropdown ── */
.ps-gp-suggest {
  position: absolute;
  z-index: 200;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ps-gp-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border: none;
  background: none;
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: capitalize;
  color: var(--ps-foreground);
}

.ps-gp-suggest-item:first-child {
  border-radius: var(--ps-radius) var(--ps-radius) 0 0;
}

.ps-gp-suggest-item:last-child {
  border-radius: 0 0 var(--ps-radius) var(--ps-radius);
}

.ps-gp-suggest-item:only-child {
  border-radius: var(--ps-radius);
}

.ps-gp-suggest-item:hover {
  background: #f3f4f6;
}

.ps-gp-suggest-item:focus,
.ps-gp-suggest-item:focus-visible {
  background: #f3f4f6;
  outline: 2px solid var(--ps-primary);
  outline-offset: -2px;
}

.ps-gp-suggest-item--active {
  background: #f3f4f6;
  outline: 2px solid var(--ps-primary);
  outline-offset: -2px;
}

/* ── Medication rows ── */
.ps-med-row {
  margin-bottom: 1.5rem;
}

.ps-med-row-number {
  display: block;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 130%;
  letter-spacing: 0%;
  color: var(--ps-foreground);
  margin-bottom: 0.75rem;
}

/* ── Service menu search input ── */
.ps-search-input {
  width: 100%;
  padding: 17px 1rem;
  border: 1px solid var(--ps-neutral);
  border-radius: 9999px;
  font-size: 1rem;
  color: var(--ps-foreground);
  background: #ffffff;
  box-shadow: 1px 8px 32px 0px #1623191F;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease;
}

/* ── Service menu popular cards (horizontal row) ── */
.ps-service-popular-grid {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ps-service-popular-card {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.ps-service-popular-name {
  font-weight: 600 !important;
  font-size: 1rem;
  line-height: 140%;
  color: var(--ps-foreground);
  margin: 0;
}

/* ── Service menu list (search results + all services) ── */
.ps-service-list {
  display: flex;
  flex-direction: column;
}

.ps-service-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--ps-neutral);
}

.ps-service-list-item:first-child {
  border-top: none;
}

.ps-service-list-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ps-foreground);
}

/* ── Service menu search button (SVG icon, right of input) ── */
.ps-search-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.ps-search-btn:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* ── Medical screen question overrides (ServiceBuilder output) ── */
.ps-medical-questions .form-control,
.ps-medical-questions .form-select {
  padding: 0.75rem;
  border: 1px solid var(--ps-neutral);
  border-radius: var(--ps-radius);
  font-size: 1rem;
  color: var(--ps-foreground);
  background-color: #ffffff;
  width: 100%;
}

/* Custom focus? */
/* .ps-medical-questions .form-control:focus,
.ps-medical-questions .form-select:focus {
  border-color: var(--ps-foreground);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ps-foreground) 15%, transparent);
  outline: none;
} */

.ps-medical-questions .form-select:hover,
.ps-medical-questions .form-control:hover {
  border-color: var(--ps-primary);
}

/* Wrappable multiple-choice (long options): a plain radio list whose labels wrap
   to a new line instead of a native <select> that truncates on desktop. */
.ps-medical-questions .ps-mc-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  /* Margin, not padding, so the closing rule lines up with the indented options. */
  margin-left: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ps-neutral-light);
}

.ps-medical-questions .ps-mc-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ps-foreground);
  cursor: pointer;
}

.ps-medical-questions .ps-mc-option input[type="radio"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.ps-medical-questions .ps-mc-option > span {
  flex: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Only offered once something is selected — there is nothing to clear before that. */
.ps-medical-questions .ps-mc-clear {
  display: none;
  margin: 0.5rem 0 0 1rem; /* left margin keeps it aligned with the options */
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  color: var(--ps-primary);
  text-decoration: underline;
  cursor: pointer;
}

.ps-medical-questions .ps-mc-options:has(input:checked) + .ps-mc-clear {
  display: inline-block;
}

.ps-medical-questions label {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 150%;
  color: var(--ps-foreground);
  margin-bottom: 0.5rem;
}

.ps-medical-questions .mb-3 {
  margin-bottom: 1.5rem !important;
}

/* ── Input validation state ── */
.ps-input-error {
  border-color: var(--ps-error-border) !important;
  background-color: var(--ps-error-bg) !important;
}

.ps-medical-questions .custom-h5 {
  font-weight: 600;
  font-size: 18px;
  line-height: 140%;
  letter-spacing: 0%;
  margin-bottom: 0.5rem !important;
}

.ps-medical-questions .custom-input-checkbox {
  display: flex;
  align-items: top;
  gap: 0.25rem;
  cursor: pointer;
}

.ps-medical-questions .custom-input-checkbox span {
  font-size: 0.875rem;
  color: var(--ps-foreground);
  margin: 0;
}

.ps-medical-questions .custom-input-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid var(--ps-neutral);
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ps-medical-questions .custom-input-checkbox input[type="checkbox"]:checked {
  background-color: #0078c3;
  border-color: #0078c3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5,8 6,11.5 13.5,4.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

/* ── Post-booking redirect toast ── */
#ps-redirect-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #0f172a;
  color: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 463px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 9999;
}

@media (max-width: 576px) {
  #ps-redirect-toast {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}

.ps-redirect-toast__heading {
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.ps-redirect-toast__body {
  margin: 0 0 1rem;
}

#ps-redirect-now {
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Standard notification toast ── */
.ps-toast {
  background: var(--ps-foreground);
  bottom: 1.5rem;
  border-radius: 1rem;
  color: white;
  max-width: 463px;
  opacity: 0;
  padding: 2rem;
  position: fixed;
  right: 1.5rem;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 100%;
  z-index: 9999;
}

.ps-toast.ps-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.ps-toast.ps-toast--hiding {
  opacity: 0;
  transform: translateY(0.5rem);
}

@media (max-width: 576px) {
  .ps-toast {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}

.ps-toast__inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.ps-toast__content {
  flex: 1;
}

.ps-toast__title {
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.ps-toast__body {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 400;
}

/* ── Bootstrap dropdown overwrite ── */
.dropdown-menu {
  padding: .5rem;
}

.dropdown-item {
  color: var(--ps-foreground);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.dropdown-item:focus,
.dropdown-item:focus-visible,
.dropdown-item:hover {
  background-color: var(--ps-neutral-lightest);
}

/* ── Welcome page ── */
.ps-welcome.ps-group-logo {
  display: none;
}

@media (width <=40rem) {
  .ps-welcome.ps-group-logo {
    display: flex;
    padding-bottom: 1rem;
  }
}

/* ── Confirm step (no-payment): mobile is one column with the confirm
   button pinned to the viewport; two columns from 40rem up. ── */
.ps-confirm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 712px;
  margin: 0 auto;
}

/* Heading sits outside a card, so restate the .ps-heading-2 sizing. */
.ps-confirm__heading {
  margin: 0;
  font-weight: 700;
  font-size: 2rem;
  line-height: 130%;
  color: var(--ps-foreground);
}

/* Cards fill their column rather than centring at their own max-width. */
.ps-confirm .ps-card {
  max-width: none;
  width: 100%;
  margin: 0;
}

.ps-confirm__actions {
  margin-top: 1.5rem;
}

@media (width <=40rem) {
  .ps-confirm__heading {
    font-size: 1.5rem;
    line-height: 120%;
    padding: 0 1.25rem;
  }

  /* Pin the confirm button to the bottom of the viewport. */
  .ps-confirm__actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    margin: 0;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: var(--ps-card-bg);
    border-top: 1px solid var(--ps-neutral-light);
    box-shadow: 0 -2px 10px rgba(0, 26, 37, 0.08);
  }

  /* Reserve space so the fixed bar never covers the form end or footer. */
  .ps-step-confirm_appointment .ps-main {
    padding-bottom: 6rem;
  }
}

@media (width >40rem) {
  .ps-confirm {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
      "heading summary"
      "form    summary";
    align-items: start;
    gap: 1.5rem;
    max-width: 1160px;
  }

  .ps-confirm__heading {
    grid-area: heading;
    align-self: center;
  }

  .ps-confirm__form {
    grid-area: form;
  }

  .ps-confirm__summary {
    grid-area: summary;
  }
}
