/* BOOK APPOINTMENT PAGE SPECIFIC STYLES */

/* HERO SECTION */
.book-hero {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FDF4F8 50%, #F8E6F0 100%);
  padding: 90px 0 80px 0;
  text-align: center;
  overflow: hidden;
}

/* Floating Dots Canvas Overlay */
.hero-particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ensure Hero Content floats above canvas */
.book-hero .container.hero-content-wrapper {
  position: relative;
  z-index: 2;
}

/* Stacked 2-Line Headline */
.book-hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 14px;
  margin-bottom: 22px;
  line-height: 1.1;
  text-align: center;
}

.hero-title-line1 {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-size: 3.25rem;
  font-weight: 900;
  color: #2A1520;
  letter-spacing: -0.025em;
  display: block;
}

.hero-title-line2 {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-size: 3.25rem;
  font-weight: 900;
  background: linear-gradient(90deg, #E8A33D 0%, #7A1B4C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
  display: block;
}

.book-hero-desc {
  max-width: 640px;
  margin: 0 auto 28px auto;
  font-size: 1.05rem;
  color: #5A4E56;
  line-height: 1.65;
}

/* Hero Feature Checklist Row */
.book-hero-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  margin-bottom: 20px;
}

.hero-feature-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 600;
  color: #2A1520;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 27, 76, 0.08);
  box-shadow: 0 4px 15px rgba(122, 27, 76, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 27, 76, 0.08);
}

.hero-feature-item .check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Responsive typography for hero headline & features */
@media (max-width: 768px) {
  .book-hero {
    padding: 60px 0 60px 0;
  }
  .hero-title-line1,
  .hero-title-line2 {
    font-size: 2.1rem;
  }
  .book-hero-features {
    gap: 14px;
    flex-direction: column;
  }
  .hero-feature-item {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* TWO-COLUMN LAYOUT */
.booking-section {
  padding: 80px 0;
}

.booking-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: flex-start;
}

/* STEPPER PROGRESS TRACKER */
.stepper-header {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border: 1px solid rgba(122, 31, 75, 0.03);
  position: relative;
  overflow-x: auto;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 80px;
}

.step-indicator::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #27AE60 50%, rgba(122, 31, 75, 0.1) 50%);
  background-size: 200% 100%;
  background-position: right bottom;
  z-index: 1;
  transition: background-position 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-indicator:last-child::after {
  display: none;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-neutral);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 2px solid rgba(122, 31, 75, 0.05);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease, border-color 0.3s ease;
}

.step-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* Stepper Active & Completed States */
.step-indicator.active .step-circle {
  background-color: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(122, 31, 75, 0.25);
}

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

.step-indicator.completed .step-circle {
  background-color: #27AE60;
  color: var(--text-white);
  border-color: #27AE60;
  animation: checkmarkPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.step-indicator.completed::after {
  background-position: left bottom;
}

.step-indicator.completed .step-label {
  color: #27AE60;
}

@keyframes pulseSelect {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1.02); }
}

@keyframes checkmarkPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* STEP CARD CONTAINER */
.step-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(122, 31, 75, 0.03);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-card-header {
  margin-bottom: 28px;
}

.step-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.step-card-desc {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* STEP CONTENT STYLES */
.step-content {
  flex: 1;
  margin-bottom: 30px;
}

/* Grid of selectable cards (Step 1) */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.selection-card {
  border: 2px solid rgba(122, 31, 75, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--bg-card);
  position: relative;
}

.selection-card:hover {
  border-color: var(--primary-light);
  background-color: rgba(251, 234, 243, 0.2);
}

.selection-card.selected {
  border-color: var(--primary);
  background-color: var(--accent-pink-light);
  transform: scale(1.02);
  animation: pulseSelect 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.selection-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.selection-card .icon-badge {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.selection-card .icon-badge svg {
  width: 20px;
  height: 20px;
}

.selection-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

/* Action row at bottom of card */
.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

/* Step 2: Doctor selection card list */
.doctor-selection-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doctor-select-card {
  border: 2px solid rgba(122, 31, 75, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--bg-card);
}

.doctor-select-card:hover {
  border-color: var(--primary-light);
  background-color: rgba(251, 234, 243, 0.2);
}

.doctor-select-card.selected {
  border-color: var(--primary);
  background-color: var(--accent-pink-light);
  transform: scale(1.02);
  animation: pulseSelect 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.doctor-select-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.doctor-select-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-select-details {
  flex: 1;
}

.doctor-select-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.05rem;
}

.doctor-select-sub {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
}

/* Step 3: Date & Slots Layout */
.schedule-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slot-btn {
  padding: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-neutral);
  border: 1px solid rgba(122, 31, 75, 0.08);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.slot-btn:hover {
  background-color: var(--accent-pink-soft);
  color: var(--primary);
}

.slot-btn.selected {
  background-color: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

.slot-btn.booked,
.slot-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background-color: #f4e7ec;
  color: #7d596d;
  border-color: rgba(122, 31, 75, 0.12);
}

.slot-btn.booked {
  text-decoration: line-through;
}

.slot-status-message {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--primary);
  min-height: 1.2rem;
}

.field-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1.5px solid rgba(122, 31, 75, 0.2);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-heading);
  transition: border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
  box-sizing: border-box;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-control:focus {
  background-color: var(--bg-card);
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(122, 31, 75, 0.12), 0 1px 4px rgba(122, 31, 75, 0.08) !important;
  outline: none;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232B2530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.field-message {
  min-height: 1rem;
  font-size: 0.8rem;
  color: #D32F2F;
}

.field-input-group .form-control.is-valid {
  border-color: #27AE60 !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.12) !important;
}

.field-input-group .form-control.is-invalid {
  border-color: #D32F2F !important;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12) !important;
}

.field-input-group .form-control.is-valid + .field-message {
  color: #27AE60;
}

.btn-next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Step 4: Details form fields */
.details-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group-full {
  grid-column: span 2;
}

/* Step 5: Summary details block */
.summary-block {
  background-color: var(--bg-neutral);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px dashed rgba(122, 31, 75, 0.15);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(122, 31, 75, 0.08);
  font-size: 0.95rem;
}

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

.summary-label {
  font-weight: 600;
  color: var(--text-heading);
}

.summary-val {
  color: var(--primary);
  font-weight: 500;
}

/* Step 6: Confirmation Screen */
.success-screen {
  text-align: center;
  padding: 40px 20px;
}

.success-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #D4EDDA;
  color: #28A745;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.success-circle svg {
  width: 36px;
  height: 36px;
}

/* SIDEBAR HELP CARD */
.booking-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.help-sidebar-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(122, 31, 75, 0.03);
}

.sidebar-section-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-heading);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.sidebar-phone-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.sidebar-phone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.sidebar-phone-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-orange);
  flex-shrink: 0;
}

.whatsapp-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #25D366;
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 30px;
}

.whatsapp-sidebar-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  background-color: #20BA56;
}

.whatsapp-sidebar-btn svg {
  width: 20px;
  height: 20px;
}

/* Walk-in hours table */
.walkin-hours-table {
  width: 100%;
  border-collapse: collapse;
}

.walkin-hours-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(122, 31, 75, 0.06);
  font-size: 0.85rem;
}

.walkin-hours-table tr:last-child td {
  border-bottom: none;
}

.walkin-hours-table td.day {
  font-weight: 600;
  color: var(--text-heading);
}

.walkin-hours-table td.time {
  text-align: right;
  color: var(--primary);
  font-weight: 600;
}

/* TRUST INDICATORS STRIP */
.trust-strip-section {
  padding: 60px 0 80px 0;
  border-top: 1px solid rgba(122, 31, 75, 0.05);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.trust-item .icon-badge {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  color: var(--primary);
  width: 52px;
  height: 52px;
}

.trust-item .icon-badge svg {
  width: 22px;
  height: 22px;
}

.trust-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.trust-subtitle {
  font-size: 0.8rem;
  color: var(--text-body);
}

/* RESPONSIVE DESIGN - BOOKING */
@media (max-width: 1024px) {
  .booking-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .booking-sidebar {
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .book-hero-title {
    font-size: 2.5rem;
  }
  
  .step-card {
    padding: 28px;
  }
  
  .schedule-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .book-hero {
    padding: 56px 0 56px 0;
  }
  
  .hero-title-line1,
  .hero-title-line2 {
    font-size: clamp(1.8rem, 5.5vw, 2.4rem);
  }
  
  .book-hero-desc {
    font-size: 0.95rem;
  }
  
  .book-hero-features {
    gap: 12px;
  }
  
  .hero-feature-item {
    font-size: 0.9rem;
  }
  
  .booking-section {
    padding: 60px 0;
  }
  
  .booking-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .stepper-header {
    padding: 20px 16px;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .book-hero {
    padding: 48px 0 48px 0;
  }
  
  .hero-title-line1,
  .hero-title-line2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .book-hero-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .book-hero-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  .book-hero-features {
    gap: 10px;
    flex-direction: column;
    margin-top: 16px;
  }
  
  .hero-feature-item {
    width: 100%;
    justify-content: center;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .booking-section {
    padding: 48px 0;
  }
  
  .booking-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .stepper-header {
    padding: 18px 14px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }
  
  .step-indicator {
    min-width: 60px;
    flex: 0 1 auto;
  }
  
  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .step-label {
    font-size: 0.65rem;
    margin-top: 4px;
    max-width: 70px;
    white-space: normal;
    word-break: break-word;
  }
  
  .step-indicator::after {
    display: none;
  }
  
  .selection-grid {
    grid-template-columns: 1fr;
  }
  
  .details-form-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .trust-item {
    padding: 20px 18px;
  }
  
  .trust-title {
    font-size: 1rem;
  }
  
  .trust-subtitle {
    font-size: 0.85rem;
  }
  
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .slot-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .selection-card {
    padding: 16px 14px;
  }
  
  .doctor-select-card {
    padding: 16px 14px;
  }
}

@media (max-width: 480px) {
  .book-hero {
    padding: 40px 0 40px 0;
  }
  
  .hero-title-line1,
  .hero-title-line2 {
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  }
  
  .book-hero-desc {
    font-size: 0.85rem;
  }
  
  .booking-section {
    padding: 40px 0;
  }
  
  .booking-grid {
    gap: 20px;
  }
  
  .stepper-header {
    padding: 16px 12px;
    gap: 6px;
  }
  
  .step-indicator {
    min-width: 50px;
  }
  
  .step-circle {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
  
  .step-label {
    font-size: 0.6rem;
    margin-top: 3px;
  }
  
  .slots-grid {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.9rem;
  }
}

/* ECG decorative line in hero */
.book-hero-ecg {
  margin-top: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.85;
}

.book-hero-ecg svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Doctor Selection Card Hover Lift */
.doctor-select-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease !important;
}

@media (hover: hover) {
  .doctor-select-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(122, 31, 75, 0.08) !important;
    border-color: rgba(192, 68, 122, 0.15) !important;
  }
}

/* Date/Time slots pop animation on selection */
@keyframes slotPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.slot-btn {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease !important;
}

.slot-btn.selected {
  animation: slotPop 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

/* Calm success checkmark draw-in animation (like completing an ECG beat) */
.success-circle svg.svg-icon-draw polyline {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-step="6"] .success-circle svg.svg-icon-draw polyline {
  stroke-dashoffset: 0 !important;
  transition-delay: 0.15s;
}

/* ==========================================================================
   BOOKING PAGE SCROLL REVEAL & INTERACTION EXTRAS
   ========================================================================== */

/* Booking sidebar: fade-in from right */
.booking-sidebar {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.2s,
              transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.2s;
}

.booking-section.revealed .booking-sidebar {
  opacity: 1;
  transform: translateX(0);
}

/* Trust item badges: gentle pulse-in on scroll reveal */
.trust-item .icon-badge {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trust-grid.revealed .trust-item:nth-child(1) .icon-badge { transition-delay: 0.08s; }
.trust-grid.revealed .trust-item:nth-child(2) .icon-badge { transition-delay: 0.18s; }
.trust-grid.revealed .trust-item:nth-child(3) .icon-badge { transition-delay: 0.28s; }
.trust-grid.revealed .trust-item:nth-child(4) .icon-badge { transition-delay: 0.38s; }

.trust-grid.revealed .trust-item .icon-badge {
  opacity: 1;
  transform: scale(1);
}

/* Trust text stagger */
.trust-item .trust-title,
.trust-item .trust-subtitle {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.trust-grid.revealed .trust-item:nth-child(1) .trust-title  { transition-delay: 0.14s; }
.trust-grid.revealed .trust-item:nth-child(1) .trust-subtitle { transition-delay: 0.18s; }
.trust-grid.revealed .trust-item:nth-child(2) .trust-title  { transition-delay: 0.24s; }
.trust-grid.revealed .trust-item:nth-child(2) .trust-subtitle { transition-delay: 0.28s; }
.trust-grid.revealed .trust-item:nth-child(3) .trust-title  { transition-delay: 0.34s; }
.trust-grid.revealed .trust-item:nth-child(3) .trust-subtitle { transition-delay: 0.38s; }
.trust-grid.revealed .trust-item:nth-child(4) .trust-title  { transition-delay: 0.44s; }
.trust-grid.revealed .trust-item:nth-child(4) .trust-subtitle { transition-delay: 0.48s; }

.trust-grid.revealed .trust-item .trust-title,
.trust-grid.revealed .trust-item .trust-subtitle {
  opacity: 1;
  transform: translateY(0);
}

/* Stepper header entrance animation */
.stepper-header {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

body.page-loaded .stepper-header {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

/* ECG progress line: each completed step indicator draws an underline */
@keyframes ecgLineDraw {
  0%   { width: 0; opacity: 0; }
  10%  { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

.step-indicator.completed .step-circle::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #27AE60, rgba(39, 174, 96, 0.3));
  border-radius: 2px;
  animation: ecgLineDraw 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

/* Success screen: entrance animation */
.success-screen .success-circle {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s,
              transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
}

[data-step="6"] .success-screen .success-circle {
  opacity: 1;
  transform: scale(1);
}

/* Ambient "heartbeat" pulse on Confirm button — calm, medical */
@keyframes calmHeartbeat {
  0%, 100% { box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2); }
  40%       { box-shadow: 0 4px 22px rgba(39, 174, 96, 0.45); }
  60%       { box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2); }
}

#confirm-booking-btn {
  animation: calmHeartbeat 3.2s ease-in-out infinite;
}

#confirm-booking-btn:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .doctor-select-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  .slot-btn.selected {
    animation: none !important;
  }
  .success-circle svg.svg-icon-draw polyline {
    transition: none !important;
    stroke-dashoffset: 0 !important;
  }
  .booking-sidebar,
  .trust-item .icon-badge,
  .trust-item .trust-title,
  .trust-item .trust-subtitle,
  .stepper-header,
  .success-screen .success-circle {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  #confirm-booking-btn {
    animation: none !important;
  }
}

/* ==========================================================================
   PHONE INPUT +91 PREFIX & ERROR STYLING
   ========================================================================== */

.phone-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(122, 31, 75, 0.2);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.phone-input-group:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(122, 31, 75, 0.12), 0 1px 4px rgba(122, 31, 75, 0.08) !important;
}

.phone-input-group.input-error {
  border-color: #D32F2F !important;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12) !important;
}

.phone-prefix {
  background-color: var(--accent-pink-soft);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-right: 1.5px solid rgba(122, 31, 75, 0.15);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.phone-input-group input.form-control {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
  background: transparent !important;
  color: var(--text-heading);
  letter-spacing: 0.04em;
}
