/* Mobile-Friendly Multi-Step Appointment Booking System for PROCARE */

.booking-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 29, 28, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.booking-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.booking-modal-container {
  background: var(--clr-bg-surface);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-bounce);
  border: 1px solid var(--clr-procare-gold-border);
}

.booking-modal-overlay.active .booking-modal-container {
  transform: translateY(0) scale(1);
}

/* Modal Header & Stepper */
.booking-modal-header {
  padding: 1.5rem 1.75rem 1.15rem 1.75rem;
  background: var(--clr-procare-teal-dark);
  color: #FFFFFF;
  position: relative;
  border-bottom: 3px solid var(--clr-procare-gold);
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title-row h3 {
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Step Progress Indicator - Connected Line Exactly Centered Through Circles */
.stepper-progress-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0 0.5rem;
}

.stepper-progress-bar::before {
  content: "";
  position: absolute;
  top: 16px; /* Exactly at center of 32px height circle */
  left: 12%;
  right: 12%;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 1;
  transform: translateY(-50%);
}

.step-indicator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.step-number {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.step-indicator.active .step-number {
  background: var(--clr-procare-gold);
  color: var(--clr-procare-teal-dark);
  box-shadow: 0 0 14px rgba(238, 186, 43, 0.6);
}

.step-indicator.completed .step-number {
  background: #10B981;
  color: #FFFFFF;
}

.step-label {
  font-size: 0.725rem;
  color: #94A3B8;
  font-weight: 600;
  text-align: center;
}

.step-indicator.active .step-label {
  color: var(--clr-procare-gold);
  font-weight: 700;
}

/* Modal Body / Steps Content */
.booking-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-heading {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--clr-procare-teal-dark);
}

.step-subtext {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-bottom: 1.25rem;
}

/* Option Cards (Fixed Non-Stretching Alignment) */
.option-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.selectable-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--clr-border);
  background: var(--clr-bg-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 56px;
  gap: 1rem;
}

.selectable-option-card:hover {
  border-color: var(--clr-procare-gold);
  background: var(--clr-procare-gold-light);
}

.selectable-option-card.selected {
  border-color: var(--clr-procare-teal-dark);
  background: var(--clr-procare-gold-light);
  box-shadow: var(--shadow-sm);
}

.option-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.option-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--clr-procare-gold);
  display: block;
}

.option-icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--clr-procare-gold-light);
  color: var(--clr-procare-teal-dark);
  border: 1px solid var(--clr-procare-gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

.option-info {
  min-width: 0;
  flex: 1;
}

.option-info h5 {
  font-size: 0.975rem;
  margin-bottom: 0.15rem;
  color: var(--clr-procare-teal-dark);
}

.option-info p {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  line-height: 1.35;
  word-wrap: break-word;
}

.radio-check-circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.selectable-option-card.selected .radio-check-circle {
  border-color: var(--clr-procare-teal-dark);
  background: var(--clr-procare-teal-dark);
}

.selectable-option-card.selected .radio-check-circle::after {
  content: "";
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: var(--clr-procare-gold);
}

/* Schedule Picker Step */
.date-selector-scroller {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
}

.date-pill {
  flex: 0 0 auto;
  width: 72px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 2px solid var(--clr-border);
  background: var(--clr-bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  scroll-snap-align: start;
}

.date-pill:hover, .date-pill.selected {
  border-color: var(--clr-procare-teal-dark);
  background: var(--clr-procare-teal-dark);
  color: var(--clr-procare-gold);
}

.date-pill .day-name {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}

.date-pill .day-num {
  font-size: 1.35rem;
  font-weight: 800;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.time-slot-btn {
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  background: var(--clr-bg-surface);
  color: var(--clr-text-main);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition-fast);
  min-height: 48px;
}

.time-slot-btn:hover, .time-slot-btn.selected {
  background: var(--clr-procare-gold);
  color: var(--clr-procare-teal-dark);
  border-color: var(--clr-procare-gold);
  box-shadow: 0 2px 10px rgba(238, 186, 43, 0.35);
}

/* Patient Form Inputs */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-procare-teal-dark);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--clr-border);
  background: #FFFFFF;
  color: var(--clr-text-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  min-height: 48px;
}

.form-input:focus {
  border-color: var(--clr-procare-gold);
  box-shadow: 0 0 0 3px rgba(238, 186, 43, 0.2);
}

/* Confirmation Card */
.confirmation-card {
  background: linear-gradient(135deg, #FEF9E7, #F4F8F8);
  border: 2px dashed var(--clr-procare-gold);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
}

.confirm-check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--clr-procare-gold);
  color: var(--clr-procare-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem auto;
  box-shadow: var(--shadow-gold);
  font-weight: 900;
}

.confirm-details-box {
  background: #FFFFFF;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.25rem 0;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.875rem;
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-row span:first-child {
  color: var(--clr-text-muted);
}

.confirm-row span:last-child {
  font-weight: 700;
  color: var(--clr-procare-teal-dark);
}

/* Modal Footer Action Bar */
.booking-modal-footer {
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--clr-border);
  background: #F8FAF9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Floating Book Sticky Bar */
.mobile-sticky-booking-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding: 0.85rem 1.25rem;
  border-top: 2px solid var(--clr-procare-gold);
  box-shadow: 0 -4px 16px rgba(23, 54, 52, 0.12);
  align-items: center;
  justify-content: space-between;
}

.mobile-sticky-text h6 {
  font-size: 0.85rem;
  color: var(--clr-procare-teal-dark);
  font-weight: 800;
}

.mobile-sticky-text p {
  font-size: 0.75rem;
  color: var(--clr-procare-teal-medium);
  font-weight: 700;
}

@media (max-width: 768px) {
  .booking-modal-container {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-sticky-booking-bar {
    display: flex;
  }

  .stepper-progress-bar::before {
    left: 8%;
    right: 8%;
  }

  .step-label {
    font-size: 0.65rem;
  }
}
