/**
 * CareScheduler Booking Widget CSS
 * Pediatric People - Pediatric Medical Practice
 *
 * Mobile-first design approach.
 *
 * Brand Colors:
 * - Primary: #1FADEB (bright cyan/blue)
 * - Accent: #EF24B7 (magenta/pink)
 * - Gradient: #EF24B7 → #9C6ADE (pink to purple)
 */

/* ============================================================================
   BASE & LAYOUT  (mobile-first)
   ============================================================================ */

.cs-booking,
.cs-booking-widget {
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 0;                /* full-bleed on mobile */
  box-shadow: none;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  color: #333333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  /* Safe area for iPhones with notch / Dynamic Island / home indicator */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.cs-booking *,
.cs-booking-widget * {
  box-sizing: border-box;
}

/* ============================================================================
   HEADER & STEP INDICATOR
   ============================================================================ */

.cs-booking__header {
  background: #f9f9f9;
  padding: 20px 12px 16px;
  border-bottom: 1px solid #e5e5e5;
}

.cs-booking__step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  gap: 4px;
}

/* Connecting line */
.cs-booking__step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #e5e5e5;
  z-index: 0;
}

.cs-booking__step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  transition: all 0.3s ease;
}

.cs-booking__step-dot-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  transition: all 0.3s ease;
  background: #e5e5e5;
  color: #999999;
  border: 2px solid transparent;
}

.cs-booking__step-dot--completed .cs-booking__step-dot-circle {
  background: #1fadeb;
  color: #ffffff;
  border-color: #1fadeb;
}

.cs-booking__step-dot--active .cs-booking__step-dot-circle {
  width: 40px;
  height: 40px;
  font-size: 14px;
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  color: #ffffff;
  border-color: #ef24b7;
  box-shadow: 0 4px 12px rgba(239, 36, 183, 0.3);
}

.cs-booking__step-dot--upcoming .cs-booking__step-dot-circle {
  background: #ffffff;
  color: #999999;
  border: 2px solid #d0d0d0;
}

.cs-booking__step-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-break: break-word;
  width: 100%;
}

.cs-booking__step-dot--active .cs-booking__step-label {
  color: #1fadeb;
  font-weight: 600;
}

.cs-booking__step-dot--completed .cs-booking__step-label {
  color: #1fadeb;
}

/* ============================================================================
   BODY (each step)
   ============================================================================ */

.cs-booking__step {
  padding: 30px 16px;   /* 30px top + bottom for all 5 steps (mobile) */
  min-height: 0;        /* don't force extra whitespace — card hugs content */
}

.cs-booking__step h6 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  letter-spacing: 0;
}

.cs-booking__step-description {
  font-size: 14px;
  color: #666666;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

/* ============================================================================
   CATEGORY ACCORDION (Step 1)
   ============================================================================ */

.cs-booking__categories-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-booking__category-block {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.cs-booking__category-block--has-selected {
  border-color: #1fadeb;
  box-shadow: 0 0 0 1px #1fadeb;
}

.cs-booking__category-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px;
  background: #f9f9f9;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  gap: 10px;
  transition: background 0.15s ease;
  text-align: left;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
.cs-booking__category-header:hover {
  background: #f0f0f0;
}
}

.cs-booking__category-header--expanded {
  border-bottom: 1px solid #e5e5e5;
}

.cs-booking__category-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-booking__category-name {
  flex: 1;
}

.cs-booking__category-count {
  font-size: 12px;
  font-weight: 500;
  color: #999999;
  background: #e5e5e5;
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 24px;
  text-align: center;
}

.cs-booking__category-arrow {
  font-size: 10px;
  color: #999999;
  flex-shrink: 0;
}

/* Service list inside expanded category */
.cs-booking__services-list {
  display: flex;
  flex-direction: column;
}

.cs-booking__service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #333333;
  text-align: left;
  transition: background 0.15s ease;
  gap: 8px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.cs-booking__service-item:last-child {
  border-bottom: none;
}

@media (hover: hover) {
.cs-booking__service-item:hover {
  background: #f5faff;
}
}

.cs-booking__service-item--selected {
  background: linear-gradient(135deg, rgba(239, 36, 183, 0.04) 0%, rgba(156, 106, 222, 0.04) 100%);
  color: #1a1a1a;
  font-weight: 600;
}

.cs-booking__service-item-name {
  flex: 1;
}

.cs-booking__service-item-check {
  color: #1fadeb;
  font-weight: 700;
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ============================================================================
   PROVIDERS GRID (Step 2)
   ============================================================================ */

.cs-booking__providers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .cs-booking__providers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 320px) {
  .cs-booking__providers-grid {
    grid-template-columns: 1fr;
  }
}

.cs-booking__provider-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-height: 80px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
.cs-booking__provider-card:hover {
  box-shadow: 0 4px 16px rgba(31, 173, 235, 0.1);
  border-color: #1fadeb;
}
}

.cs-booking__provider-card:active {
  transform: scale(0.97);
}

.cs-booking__provider-card--selected {
  background: linear-gradient(135deg, rgba(239, 36, 183, 0.04) 0%, rgba(156, 106, 222, 0.04) 100%);
  border-color: #1fadeb;
  box-shadow: 0 0 0 1px #1fadeb, 0 4px 16px rgba(31, 173, 235, 0.12);
}

/* First Available card special styling */
.cs-booking__provider-card--first-available {
  border-left: none;
  border-top: 3px solid #1FADEB;
}

.cs-booking__provider-image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-booking__provider-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-booking__avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.cs-booking__provider-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

.cs-booking__provider-title {
  font-size: 11px;
  color: #888888;
  margin: -4px 0 0 0;
  line-height: 1.3;
}

.cs-booking__no-items {
  color: #999999;
  font-size: 14px;
  text-align: center;
  padding: 32px 16px;
}

/* ============================================================================
   CALENDAR & TIME SLOTS (Step 3)
   ============================================================================ */

.cs-booking__calendar-section {
  margin-bottom: 16px;
}

.cs-booking__month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cs-booking__month-display {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.cs-booking__nav-btn {
  background: #f5f5f5;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  transition: all 0.15s ease;
  font-size: 22px;
  font-weight: 300;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
.cs-booking__nav-btn:hover {
  background: #1fadeb;
  color: #ffffff;
}
}

.cs-booking__calendar {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px;
}

.cs-booking__calendar .cs-booking__calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.cs-booking__calendar-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #999999;
  text-transform: uppercase;
  padding: 6px 0;
}

.cs-booking__calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cs-booking__calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: default;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  transition: all 0.15s ease;
  width: 100%;
  aspect-ratio: 1;
  max-height: 48px;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

.cs-booking__calendar-day--available {
  cursor: pointer;
  font-weight: 600;
  color: #1a1a1a;
}

.cs-booking__calendar-day--available::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #1fadeb;
  border-radius: 50%;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

@media (hover: hover) {
.cs-booking__calendar-day--available:hover {
  background: rgba(31, 173, 235, 0.08);
}
}

.cs-booking__calendar-day--selected {
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(239, 36, 183, 0.25);
}

.cs-booking__calendar-day--selected::after {
  background: #ffffff;
}

.cs-booking__calendar-day--today {
  border-color: #1fadeb;
  border-width: 2px;
}

.cs-booking__calendar-day--disabled {
  color: #d0d0d0;
  cursor: not-allowed;
}

.cs-booking__calendar-day--disabled::after {
  display: none;
}

.cs-booking__calendar-day--empty {
  background: transparent;
  border: none;
  cursor: default;
}

/* Time slots */
.cs-booking__time-slots-section {
  margin-top: 20px;
}

.cs-booking__time-slots-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.cs-booking__time-group {
  margin-bottom: 16px;
}

.cs-booking__time-group:last-child {
  margin-bottom: 0;
}

.cs-booking__time-group-header {
  font-size: 13px;
  font-weight: 600;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cs-booking__time-group-icon {
  font-size: 14px;
}

.cs-booking__time-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cs-booking__time-slot {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: normal;
  word-break: break-word;
  color: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;                 /* Apple HIG minimum touch target */
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  line-height: 1.3;
}

@media (hover: hover) {
.cs-booking__time-slot:hover {
  border-color: #1fadeb;
  background: rgba(31, 173, 235, 0.05);
}
}

.cs-booking__time-slot:active {
  transform: scale(0.96);
  background: rgba(31, 173, 235, 0.1);
}

.cs-booking__time-slot--selected {
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
}

.cs-booking__slot-time {
  font-weight: 600;
}

.cs-booking__slot-provider {
  font-size: 11px;
  opacity: 0.8;
}

.cs-booking__time-slot--selected .cs-booking__slot-provider {
  opacity: 1;
}

.cs-booking__time-slot--more {
  background: transparent;
  border: 1px dashed #1fadeb;
  color: #1fadeb;
  font-weight: 600;
  font-size: 12px;
}

@media (hover: hover) {
.cs-booking__time-slot--more:hover {
  background: rgba(31, 173, 235, 0.08);
  border-style: solid;
}
}

.cs-booking__no-slots {
  color: #999999;
  font-size: 14px;
  text-align: center;
  padding: 16px;
  width: 100%;
}

/* ============================================================================
   STEP 1 – PATIENT INFO CARD
   ============================================================================ */

.cs-step1__card {
  background: #f8fbfe;
  border: 1px solid #e2ecf4;
  border-radius: 12px;
  padding: 20px 16px;
}

.cs-step1__name-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cs-step1__card .cs-booking__form-input {
  background: #ffffff;
  border: 1.5px solid #d4dfe8;
  border-radius: 10px;
  padding: 14px 16px;
}

.cs-step1__card .cs-booking__form-input:focus {
  border-color: #1fadeb;
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.12);
}

.cs-step1__card .cs-booking__form-input::placeholder {
  color: #a0adb8;
}

/* ============================================================================
   FORM (Step 4)
   ============================================================================ */

.cs-booking__patient-form {
  width: 100%;
}

.cs-booking__form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1fadeb;
  margin: 24px 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e5e5e5;
}

.cs-booking__form-section-title:first-child {
  margin-top: 0;
}

.cs-booking__form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.cs-booking__form-label {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 4px;
}

.cs-booking__required {
  color: #ef24b7;
}

.cs-booking__form-input {
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;       /* ≥16px prevents iOS zoom on focus */
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #333333;
  -webkit-appearance: none;
  appearance: none;
}

.cs-booking__form-input::placeholder {
  color: #999999;
}

.cs-booking__form-input:focus {
  outline: none;
  border-color: #1fadeb;
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.1);
}

.cs-booking__form-input--error {
  border-color: #ef24b7;
}

.cs-booking__form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 36, 183, 0.1);
}

.cs-booking__form-error {
  font-size: 12px;
  color: #ef24b7;
  margin-top: 4px;
  display: none;
}

textarea.cs-booking__form-input {
  resize: vertical;
  min-height: 80px;
}

/* ── Step 1 Dropdown Fields ────────────────────────────────────────────────── */

.cs-booking__field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.cs-booking__field-label {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 6px;
}

.cs-booking__select {
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 12px 36px 12px 14px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff 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='%23666' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: #333333;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  width: 100%;
}

.cs-booking__select:focus {
  outline: none;
  border-color: #1fadeb;
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.1);
}

.cs-booking__select:disabled {
  background-color: #f5f5f5;
  color: #999999;
  cursor: not-allowed;
}

/* ============================================================================
   CONFIRMATION (Step 5)
   ============================================================================ */

.cs-booking__confirmation-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 16px;
}

.cs-booking__checkmark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 10px;
  animation: cs-checkmark-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cs-checkmark-bounce {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

.cs-booking__confirmation-success h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px 0;
}

.cs-booking__confirmation-summary {
  width: 100%;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  border-left: 4px solid #1fadeb;
  text-align: left;
}

.cs-booking__summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #e5e5e5;
  gap: 8px;
}

.cs-booking__summary-item:last-child {
  border-bottom: none;
}

.cs-booking__summary-label {
  color: #666666;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.cs-booking__summary-value {
  color: #1a1a1a;
  font-weight: 600;
  text-align: right;
}

.cs-booking__confirmation-instructions {
  width: 100%;
  background: #fffbeb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-left: 4px solid #f59e0b;
  text-align: left;
}

.cs-booking__instructions-header {
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}

.cs-booking__instructions-icon {
  margin-right: 4px;
}

.cs-booking__instructions-body {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
  white-space: pre-line;
}

/* ── Combo Visit Prompt ───────────────────────────────────── */

.cs-combo__header {
  text-align: center;
  margin-bottom: 20px;
}

.cs-combo__title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.cs-combo__subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.cs-combo__toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}

@media (hover: hover) {
.cs-combo__toggle:hover {
  border-color: #1FADEB;
  background: #f0f9ff;
}
}

.cs-combo__toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #1FADEB;
}

.cs-combo__toggle-label {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.cs-combo__details {
  animation: cs-combo-slide-in 0.2s ease-out;
}

@keyframes cs-combo-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cs-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.cs-combo__reason-group {
  margin-bottom: 16px;
}

.cs-combo__reason-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.cs-combo__reason-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.cs-combo__reason-input:focus {
  outline: none;
  border-color: #1FADEB;
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.1);
}

.cs-combo__billing-notice {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  margin-bottom: 14px;
}

.cs-combo__billing-icon {
  font-size: 20px;
  color: #d97706;
  flex-shrink: 0;
  line-height: 1.4;
}

.cs-combo__billing-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.cs-combo__acknowledge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 8px;
}

.cs-combo__acknowledge input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #1FADEB;
}

.cs-booking__confirmation-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
}

.cs-booking__confirmation-error h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ef24b7;
  margin: 0 0 12px 0;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.cs-booking__navigation {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: #f9f9f9;
  border-top: 1px solid #e5e5e5;
}

.cs-booking__button {
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  width: 100%;
  min-height: 50px;                 /* large comfortable touch target */
  -webkit-tap-highlight-color: transparent;
}

.cs-booking__button--primary {
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  color: #ffffff;
}

@media (hover: hover) {
.cs-booking__button--primary:hover {
  box-shadow: 0 4px 16px rgba(239, 36, 183, 0.3);
  transform: translateY(-1px);
}
}

.cs-booking__button--primary:active {
  transform: scale(0.97);
  box-shadow: none;
}

.cs-booking__button--secondary {
  background: #ffffff;
  color: #1fadeb;
  border: 1.5px solid #1fadeb;
}

@media (hover: hover) {
.cs-booking__button--secondary:hover {
  background: rgba(31, 173, 235, 0.05);
}
}

.cs-booking__button:disabled,
.cs-booking__button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================================
   LOADING & ERROR STATES
   ============================================================================ */

.cs-booking__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  min-height: 250px;
}

.cs-booking__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e5e5;
  border-top-color: #1fadeb;
  border-radius: 50%;
  animation: cs-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

.cs-booking__error {
  background: #fff5f7;
  border: 1px solid #ef24b7;
  border-radius: 8px;
  padding: 16px;
  margin: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cs-booking__error-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================================================
   RESPONSIVE: TABLET & DESKTOP (≥600px)
   ============================================================================ */

@media (min-width: 600px) {
  .cs-booking,
  .cs-booking-widget {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  .cs-booking__header {
    padding: 28px 24px 24px;
  }

  .cs-booking__step-indicator {
    gap: 8px;
  }

  .cs-booking__step-dot-circle {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .cs-booking__step-dot--active .cs-booking__step-dot-circle {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .cs-booking__step-label {
    font-size: 11px;
  }

  .cs-booking__step {
    padding: 30px 24px;   /* 30px top + bottom for all 5 steps (desktop) */
    min-height: 0;        /* don't force extra whitespace — card hugs content */
  }

  .cs-booking__step h6 {
    font-size: 14px;
  }

  /* Providers: 2-column on tablet+ */
  .cs-booking__providers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-booking__navigation {
    flex-direction: row;
    justify-content: space-between;
    padding: 24px;
    gap: 12px;
  }

  .cs-booking__button {
    width: auto;
    padding: 12px 28px;
  }

  .cs-booking__button--primary,
  .cs-booking__button--new-patient {
    flex: 1;
    max-width: 300px;
  }

  /* 3.25.77: match the I'M A NEW PATIENT button's height + padding to
     NEXT so both read as equal-weight controls on Step 1. */
  .cs-booking__button--new-patient {
    padding: 12px 28px;
  }

  .cs-booking__time-slots {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-booking__time-slot {
    padding: 10px 12px;
    font-size: 13px;
    min-height: 40px;
    border-radius: 10px;
  }

  .cs-booking__calendar {
    padding: 20px;
  }

  .cs-booking__calendar-day {
    max-height: 48px;
    font-size: 14px;
  }

  .cs-booking__confirmation-success {
    padding: 20px 24px;
  }

  .cs-booking__confirmation-success h2 {
    font-size: 20px;
  }

  .cs-booking__checkmark {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .cs-booking__form-input {
    font-size: 15px;    /* slightly smaller on desktop; stays >=16 on mobile to prevent iOS zoom */
    padding: 10px 12px;
  }

  .cs-step1__card {
    padding: 24px;
  }

  .cs-step1__name-row {
    flex-direction: row;
    gap: 12px;
  }

  .cs-step1__name-row > .cs-booking__form-field {
    flex: 1;
  }

  .cs-triage__textarea {
    font-size: 15px;
  }

  .cs-triage__reply-input {
    font-size: 15px;
  }
}

/* ============================================================================
   ACCESSIBILITY & UTILITIES
   ============================================================================ */

.cs-booking__button:focus-visible,
.cs-booking__service-item:focus-visible,
.cs-booking__category-header:focus-visible,
.cs-booking__time-slot:focus-visible,
.cs-booking__nav-btn:focus-visible {
  outline: 2px solid #1fadeb;
  outline-offset: 2px;
}

.cs-booking__form-input:focus-visible {
  outline: none;
}

.cs-booking__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.cs-booking__hidden {
  display: none;
}

/* ─── Smart Triage UI ────────────────────────────────────────── */

.cs-triage__greeting {
  text-align: center;
  margin-bottom: 20px;
}

.cs-triage__greeting-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.cs-triage__greeting-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Quick-tap shortcut chips — responsive flex so tiles sit inline when they fit */
.cs-triage__chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}


.cs-triage__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: inherit;
  min-height: 48px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

/* Center the last row when it has fewer than 3 items */
.cs-triage__chips > .cs-triage__chip:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

@media (hover: hover) {
.cs-triage__chip:hover {
  border-color: var(--cs-primary, #1fadeb);
  background: #f0f9ff;
}
}

.cs-triage__chip:active {
  transform: scale(0.97);
  background: #e0f2fe;
}

.cs-triage__chip-icon {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 480px) {
  .cs-triage__chips {
    grid-template-columns: repeat(2, 1fr);
  }
  .cs-triage__chips > .cs-triage__chip:last-child:nth-child(3n + 1) {
    grid-column: auto;
  }
  .cs-triage__chip {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* Divider */
.cs-triage__divider {
  text-align: center;
  position: relative;
  margin: 16px 0;
}

.cs-triage__divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.cs-triage__divider span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  color: #94a3b8;
}

/* Free-text input group */
.cs-triage__input-group {
  margin-bottom: 8px;
}

.cs-triage__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;       /* >=16px prevents iOS auto-zoom on focus */
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.cs-triage__textarea:focus {
  outline: none;
  border-color: var(--cs-primary, #1fadeb);
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.1);
}

.cs-triage__char-count {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.cs-triage__submit-btn {
  margin-top: 12px;
  width: 100%;
}

/* Loading spinner */
.cs-triage__loading {
  text-align: center;
  padding: 20px 0;
}

.cs-triage__loading p {
  color: #64748b;
  margin: 8px 0 0;
  font-size: 14px;
}

/* Chat conversation bubbles */
.cs-triage__chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 45vh;               /* viewport-relative so it works on all phone sizes */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
  padding: 8px 4px;
  scroll-behavior: smooth;
}

.cs-triage__bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cs-triage__bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, #ef24b7 0%, #9c6ade 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.cs-triage__bubble--assistant {
  align-self: flex-start;
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

/* Reply input */
.cs-triage__reply-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: flex-end;
}

.cs-triage__reply-input {
  flex: 1;
  min-width: 0;                    /* prevent flex blowout on narrow screens */
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 22px;             /* pill shape like iMessage */
  font-size: 16px;                 /* >=16px prevents iOS auto-zoom on focus */
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}

.cs-triage__reply-input:focus {
  outline: none;
  border-color: var(--cs-primary, #1fadeb);
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.1);
}

.cs-triage__reply-btn {
  white-space: nowrap;
  padding: 12px 20px;
  min-height: 44px;
  width: auto;                     /* override full-width button default */
  flex-shrink: 0;
  border-radius: 22px;             /* pill shape to match input */
  font-size: 15px;
  text-transform: none;            /* "Send" looks better without uppercase */
}

/* Skip / manual link */
.cs-triage__skip-link {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 16px 0 8px;             /* generous padding for easy tapping */
  text-decoration: underline;
  font-family: inherit;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
.cs-triage__skip-link:hover {
  color: var(--cs-primary, #1fadeb);
}
}

.cs-triage__skip-link:active {
  color: #1e293b;
}

/* Options cards */
.cs-triage__options-message {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 14px 0;
}

.cs-triage__options-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-triage__option-card {
  padding: 16px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
.cs-triage__option-card:hover {
  border-color: var(--cs-primary, #1fadeb);
  background: #f0f9ff;
}
}

.cs-triage__option-card:active {
  transform: scale(0.98);
}

.cs-triage__option-card--selected {
  border-color: var(--cs-primary, #1fadeb);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(31, 173, 235, 0.15);
}

.cs-triage__option-card--recommended {
  border-color: var(--cs-primary, #1fadeb);
}

.cs-triage__option-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cs-triage__option-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-triage__option-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.cs-triage__option-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--cs-primary, #1fadeb);
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: auto;
}

.cs-triage__option-category {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 2px;
  padding-left: 18px;
}

.cs-triage__option-duration {
  font-size: 14px;
  color: #64748b;
  padding-left: 18px;
}

.cs-triage__option-description {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.cs-triage__option-explanation {
  font-size: 14px;
  color: #475569;
  margin-top: 6px;
  padding-left: 18px;
  font-style: italic;
  line-height: 1.5;
}

.cs-triage__alt-label {
  font-size: 13px;
  color: #94a3b8;
  margin: 8px 0 0 0;
}

/* ── Qualifying Question ─────────────────────────────────── */
.cs-booking__step-qualifying {
  padding: 24px 0;
}

.cs-qualifying__header {
  text-align: center;
  margin-bottom: 28px;
  padding: 0 8px;
}

.cs-qualifying__question {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.5;
}

.cs-qualifying__options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.cs-qualifying__option-btn {
  display: inline-block;
  width: auto;
  min-width: 400px;
  max-width: 80%;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

@media (hover: hover) {
.cs-qualifying__option-btn:hover {
  border-color: #1FADEB;
  background: #f0f9ff;
  color: #0c7abf;
}
}

.cs-qualifying__option-btn:active {
  transform: scale(0.98);
}

/* ── No-Show / Late Cancellation Fee Notice ────────────── */
.cs-booking__fee-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0 20px;
  text-align: center;
}

.cs-booking__fee-notice-header {
  font-size: 14px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 10px;
}

.cs-booking__fee-notice p {
  font-size: 13px;
  color: #7f1d1d;
  margin: 0;
  line-height: 1.6;
}

.cs-booking__fee-notice-sub {
  font-size: 13px;
  font-weight: 600;
  color: #991b1b;
  margin-top: 14px;
  margin-bottom: 10px;
}

.cs-booking__fee-notice-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cs-booking__fee-notice-method {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #7f1d1d;
  text-align: left;
  line-height: 1.4;
}

.cs-booking__fee-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

@media (max-width: 480px) {
  .cs-booking__fee-notice-methods {
    grid-template-columns: 1fr;
  }
}

/* ── Add to Calendar ────────────────────────────────────── */
.cs-booking__add-to-calendar {
  text-align: center;
  margin: 20px 0 16px;
}

.cs-booking__calendar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

@media (hover: hover) {
.cs-booking__calendar-toggle:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}
}

.cs-booking__calendar-toggle-icon {
  font-size: 18px;
}

.cs-booking__calendar-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cs-booking__calendar-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (hover: hover) {
.cs-booking__calendar-option:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #1e293b;
}
}

@media (max-width: 480px) {
  .cs-booking__calendar-options {
    flex-direction: column;
    align-items: center;
  }
  .cs-booking__calendar-option {
    width: 200px;
    justify-content: center;
  }
}

/* ── Medical Care Only Days ──────────────────────────────── */
.cs-booking__calendar-day--medical-only {
  position: relative;
}

.cs-booking__calendar-day--medical-only::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: #ef4444;
  border-radius: 50%;
}


/* ── 3.25.112: Sibling context banner ──────────────────── */
.cs-booking__sibling-ctx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  margin: 0 0 16px 0;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.4;
}
.cs-booking__sibling-ctx-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.cs-booking__sibling-ctx-body {
  flex: 1;
  min-width: 0;
}
.cs-booking__sibling-ctx-title {
  font-weight: 700;
  margin-bottom: 2px;
  color: #1e3a8a;
}
.cs-booking__sibling-ctx-meta {
  color: #1e40af;
}
.cs-booking__sibling-ctx-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  margin: -4px -4px -4px 0;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.15s ease;
}
@media (hover: hover) {
  .cs-booking__sibling-ctx-close:hover {
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
  }
}


/* ── 3.25.116: Step 1 nav — cluster buttons centered on desktop ─────
   The default .cs-booking__navigation rule on desktop uses
   justify-content:space-between which throws I'M A NEW PATIENT and
   NEXT to opposite extremes of the 720px-max card. Center-cluster
   them with a small gap so they read as a unified pair, matching
   the visual rhythm of the new-patient screens above. */
@media (min-width: 600px) {
  .cs-booking__step-1 + .cs-booking__navigation,
  .cs-booking__step.cs-booking__step-1 ~ .cs-booking__navigation {
    justify-content: center;
    gap: 14px;
  }
}


/* ── 3.25.120: New-patient buttons — equal widths on desktop ──────
   The base desktop rule caps primary buttons at max-width:300px.
   Inside .cs-booking__new-patient that conflicts with our 380px
   column, making primary buttons (Well Care / Urgent Care /
   Continue) narrower than the secondary Back button. Override
   inside the new-patient container so all buttons in the column
   stretch identically. */
@media (min-width: 600px) {
  .cs-booking__new-patient .cs-booking__button,
  .cs-booking__new-patient .cs-booking__button--primary,
  .cs-booking__new-patient .cs-booking__button--secondary {
    max-width: none !important;
    flex: 0 0 auto !important;
    width: 100% !important;
  }
}
