/*!
 * Semble Booking Flow CSS
 * Version: 3.0.0
 * Date: January 2025
 * 
 * PURPOSE:
 * Contains all booking-specific styles that are not part of the core design system.
 * This includes appointment type selection, service selection, doctor selection,
 * availability calendar, and booking confirmation components.
 * 
 * DEPENDENCIES:
 * - core.css (design tokens, base components, utilities)
 * 
 * EXPECTED CLASSES TO BE MIGRATED:
 * 
 * Appointment Type Selection:
 * - .semble-appointment-type-card
 * - .semble-appointment-type-content
 * - .semble-booking-type-heading
 * 
 * Service Selection:
 * - .semble-service-type-card
 * - .semble-service-type-content
 * - .semble-consultation-type-card
 * - .semble-consultation-type-content
 * - .semble-consultation-title-with-icon
 * - .semble-consultation-icon
 * 
 * Doctor Selection:
 * - .semble-doctor-card
 * - .semble-doctor-card-content
 * - .semble-doctor-image
 * - .semble-doctor-initials
 * - .semble-doctors-grid
 * 
 * Availability Calendar:
 * - .semble-availability-selection
 * - .semble-date-navigation
 * - .semble-nav-controls
 * - .semble-week-lozenges
 * - .semble-day-lozenge
 * - .semble-time-slot
 * - .semble-slots-grid
 * 
 * Booking Confirmation:
 * - .semble-booking-confirmation
 * - .semble-booking-details
 * - .semble-booking-result
 * - .semble-booking-success
 * - .semble-booking-error
 * 
 * PAYG (Pay As You Go) Components:
 * - .semble-payg-booking
 * - .semble-payg-iframe-container
 * - .semble-payg-iframe
 * 
 * Subscription Components:
 * - .semble-subscription-booking
 * - .semble-subscription-services
 * - .semble-subscription-doctors
 * - .semble-subscription-availability
 * - .semble-subscription-login-required
 * - .semble-subscription-role-required
 * 
 * STRUCTURE:
 * 1. Appointment Type Selection
 * 2. Service Selection
 * 3. Doctor Selection
 * 4. Availability Calendar
 * 5. Booking Confirmation
 * 6. PAYG Components
 * 7. Subscription Components
 * 8. Responsive Design
 */

/* ==========================================================================
   PLACEHOLDER: MIGRATION IN PROGRESS
   ========================================================================== */

/* TODO: Migrate appointment type selection styles */
/* TODO: Migrate service selection styles */
/* TODO: Migrate doctor selection styles */
/* TODO: Migrate availability calendar styles */
/* TODO: Migrate booking confirmation styles */
/* TODO: Migrate PAYG component styles */
/* TODO: Migrate subscription component styles */ 

/*!
 * Semble Booking Flow CSS
 * 
 * PURPOSE:
 * Styles specific to the booking flow components (appointment type selection,
 * consultation type selection, doctor selection, availability, booking confirmation)
 * 
 * DEPENDENCIES:
 * - semble-core.css (must be loaded first)
 * 
 * EXPECTED CLASSES TO BE MIGRATED:
 * - .semble-appointment-type-card
 * - .semble-consultation-type-card  
 * - .semble-doctor-card
 * - .semble-booking-confirmation
 * - .semble-availability-selection
 * - .semble-time-slot
 * - .semble-day-lozenge
 */

/* ==========================================================================
   APPOINTMENT TYPE CARDS - BLUE INFO EXPERIMENT
   ========================================================================== */

/* Blue info styling with green accent for appointment type cards */
.semble-card--appointment-type {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  min-height: 120px;
  background: #f8fbff;
  border: 1px solid #e3f2fd;
  border-left: 4px solid #ADE3DB;
  box-shadow: var(--semble-shadow-sm);
  /* Animation initial state */
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

.semble-card--appointment-type:hover {
  border-color: #159D7B;
  box-shadow: var(--semble-shadow-md);
}

/* Animation trigger class */
.semble-card--appointment-type.semble-animate {
  animation: cardZoomIn 0.6s ease-out forwards;
}

/* Staggered animation delays */
.semble-card--appointment-type.semble-animate.semble-delay-1 {
  animation-delay: 0.1s;
}

.semble-card--appointment-type.semble-animate.semble-delay-2 {
  animation-delay: 0.2s;
}

/* Hover state - only apply transform when animation is complete */
.semble-card--appointment-type.semble-animate:hover {
  transform: scale(1) translateY(-1px);
}

/* Override generic card actions for appointment type cards */
.semble-card--appointment-type .semble-card__actions {
  justify-content: center;
}

/* Ensure appointment type cards maintain centered content */
.semble-card--appointment-type .semble-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--semble-spacing-lg);
  height: 100%;
}

.semble-card--appointment-type .semble-card__title {
  color: var(--semble-gray-800);
  font-weight: 600;
}

.semble-card--appointment-type .semble-text {
  color: #424242;
}

/* Ensure appointment type grid centers cards evenly */
.semble-grid--2-cols {
  display: flex;
  justify-content: space-evenly;
  align-items: stretch;
  gap: var(--semble-spacing-4xl);
}

/* Mobile responsive - stack appointment type cards vertically */
@media (max-width: 768px) {
  .semble-grid--2-cols {
    flex-direction: column;
    align-items: center;
    gap: var(--semble-spacing-xl);
  }
  
  .semble-card--appointment-type {
    width: 100%;
    max-width: 350px;
    min-width: unset;
  }
  
  /* Make doctor cards wider on mobile to match other cards */
  .semble-card--doctor {
    width: 100% !important;
    max-width: 350px !important;
    min-width: unset !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Handle doctor grid layout - target the correct auto-fit grid */
  .semble-grid--auto-fit,
  #semble-subscription-doctors-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: var(--semble-spacing-xl) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Ensure doctor container has no extra padding */
  #semble-subscription-doctors {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Selected state for appointment type cards */
.semble-card--appointment-type.selected {
  border-color: var(--semble-primary);
  background: #E8F5E8;
  border-left: 4px solid #48A999;
  box-shadow: 0 0 0 3px rgba(173, 227, 219, 0.3);
}

/* Selected state button styling - circular checkmark */
.semble-card--appointment-type.selected .semble-button {
  background-color: var(--semble-primary-active) !important;
  color: var(--semble-white) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

/* ==========================================================================
   CONSULTATION TYPE CARDS - BLUE INFO EXPERIMENT
   ========================================================================== */

/* Blue info styling with green accent for consultation type cards */
.semble-card--consultation-type {
  min-height: 220px;
  padding: var(--semble-spacing-3xl) var(--semble-spacing-3xl);
  background: #f8fbff;
  border: 1px solid #e3f2fd;
  border-left: 4px solid #ADE3DB;
  box-shadow: var(--semble-shadow-sm);
  /* Animation initial state */
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

.semble-card--consultation-type:hover {
  border-color: #159D7B;
  box-shadow: var(--semble-shadow-md);
}

/* Animation trigger class */
.semble-card--consultation-type.semble-animate {
  animation: cardZoomIn 0.6s ease-out forwards;
}

/* Staggered animation delays for 3 cards */
.semble-card--consultation-type.semble-animate.semble-delay-1 {
  animation-delay: 0.1s;
}

.semble-card--consultation-type.semble-animate.semble-delay-2 {
  animation-delay: 0.2s;
}

.semble-card--consultation-type.semble-animate.semble-delay-3 {
  animation-delay: 0.3s;
}

/* Hover state - only apply transform when animation is complete */
.semble-card--consultation-type.semble-animate:hover {
  transform: scale(1) translateY(-1px);
}

/* Ensure consultation type cards maintain centered content with space-between */
.semble-card--consultation-type .semble-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  height: 100%;
}

/* Header with icon and title */
.semble-card--consultation-type .semble-card__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--semble-spacing-md);
  margin-bottom: 0;
  width: 100%;
  min-height: 64px;
}

.semble-card--consultation-type .semble-card__title {
  color: var(--semble-gray-800);
  font-weight: 600;
}

.semble-card--consultation-type .semble-text {
  color: #424242;
}

/* Icon styling */
.semble-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.semble-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Override generic card actions for consultation type cards */
.semble-card--consultation-type .semble-card__actions {
  justify-content: center;
}

/* Selected state for consultation type cards */
.semble-card--consultation-type.selected {
  border-color: var(--semble-primary);
  background: #E8F5E8;
  border-left: 4px solid #48A999;
  box-shadow: 0 0 0 3px rgba(173, 227, 219, 0.3);
}

/* Selected state button styling - circular checkmark */
.semble-card--consultation-type.selected .semble-button {
  background-color: var(--semble-primary-active) !important;
  color: var(--semble-white) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

/* ==========================================================================
   DOCTOR CARDS
   ========================================================================== */

/* Ensure doctor grid is visible */
#semble-subscription-doctors-grid {
  display: grid !important;
  min-height: 200px;
}

/* Doctor card specific styling */
.semble-card--doctor {
  min-height: 220px;
  width: 100%;
  min-width: 200px;
  max-width: 280px;
  transition: none; /* Disable transition to prevent flicker on re-render */
  display: flex !important;
  flex-direction: column;
  background: #f8fbff;
  border: 1px solid #e3f2fd;
  border-left: 4px solid #ADE3DB;
  box-shadow: var(--semble-shadow-sm);
  /* Animation initial state */
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

/* Animation trigger class for doctor cards */
.semble-card--doctor.semble-animate {
  animation: cardZoomIn 0.6s ease-out forwards;
}

/* Staggered animation delays for doctor cards */
.semble-card--doctor.semble-animate.semble-delay-1 {
  animation-delay: 0.1s;
}

.semble-card--doctor.semble-animate.semble-delay-2 {
  animation-delay: 0.2s;
}

.semble-card--doctor.semble-animate.semble-delay-3 {
  animation-delay: 0.3s;
}

.semble-card--doctor.semble-animate.semble-delay-4 {
  animation-delay: 0.4s;
}

.semble-card--doctor.semble-animate.semble-delay-5 {
  animation-delay: 0.5s;
}

.semble-card--doctor.semble-animate.semble-delay-6 {
  animation-delay: 0.6s;
}

.semble-card--doctor:hover {
  border-color: #159D7B;
  box-shadow: var(--semble-shadow-lg);
  transform: translateY(-2px);
}

.semble-card--doctor .semble-card__title {
  color: var(--semble-gray-800);
  font-weight: 600;
}

.semble-card--doctor.selected {
  border-color: var(--semble-primary);
  background: #E8F5E8;
  border-left: 4px solid #48A999;
  box-shadow: 0 0 0 3px rgba(173, 227, 219, 0.3);
  transform: translateY(-2px);
}

/* Doctor card content layout */
.semble-card--doctor .semble-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--semble-spacing-lg);
  text-align: center;
  height: 100%;
  flex: 1;
}

/* Doctor card title */
.semble-card--doctor .semble-card__title {
  font-size: var(--semble-font-size-lg);
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  flex-shrink: 0;
}

/* Doctor card image */
.semble-card__image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid var(--semble-gray-200);
  transition: var(--semble-transition);
  box-shadow: var(--semble-shadow-md);
}

.semble-card--doctor:hover .semble-card__image {
  border-color: var(--semble-gray-300);
  box-shadow: var(--semble-shadow-lg);
  transform: scale(1.02);
}

.semble-card--doctor.selected .semble-card__image {
  border-color: var(--semble-primary);
  box-shadow: 0 8px 25px rgba(49, 130, 206, 0.4);
  transform: scale(1.02);
}

.semble-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Doctor card image - no image state */
.semble-card__image--no-image {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Doctor card initials */
.semble-card__initials {
  color: var(--semble-white);
  font-size: var(--semble-font-size-xl);
  font-weight: bold;
  text-align: center;
}

/* Override generic card actions for doctor cards */
.semble-card--doctor .semble-card__actions {
  justify-content: center;
}


/* Selected state button styling - circular checkmark */
.semble-card--doctor.selected .semble-button {
  background-color: var(--semble-primary-active) !important;
  color: var(--semble-white) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

/* ==========================================================================
   PAYG IFRAME COMPONENTS
   ========================================================================== */

/* iFrame container */
.semble-iframe-container {
  position: relative;
  width: 100%;
  max-width: 880px;
  height: 540px;
  border: 1px solid var(--semble-gray-200);
  border-radius: var(--semble-radius-md);
  overflow: hidden;
  margin: 10px auto 0;
}

/* iFrame element */
.semble-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading spinner overlay */
.semble-loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10;
}

/* Loading spinner content */
.semble-loading-spinner__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Loading spinner icon */
.semble-loading-spinner .semble-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--semble-gray-200);
  border-top: 4px solid var(--semble-primary);
  border-radius: 50%;
  animation: semble-spin 1s linear infinite;
  margin: 0 auto var(--semble-spacing-lg);
} 

/* ========================================
   AVAILABILITY INTERFACE
   ======================================== */

/* Availability Container */
.semble-availability {
    display: flex;
    flex-direction: column;
    gap: var(--semble-spacing-xl);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Availability Header */
.semble-availability__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--semble-spacing-lg);
}

.semble-availability__title {
    margin: 0;
    color: var(--semble-color-text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
    width: 100%;
}

.semble-availability__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--semble-spacing-lg);
}

/* Availability Navigation */
.semble-availability__nav {
    display: flex;
    align-items: center;
    gap: var(--semble-spacing-lg);
}

.semble-availability__nav-btn {
    background: var(--semble-primary) !important;
    color: var(--semble-white) !important;
    border: none !important;
    border-radius: var(--semble-radius-sm) !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: var(--semble-transition) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.semble-availability__nav-btn:hover:not(:disabled) {
    background: var(--semble-primary-hover) !important;
    transform: scale(1.05) !important;
}

.semble-availability__nav-btn:disabled {
    background: var(--semble-gray-300) !important;
    color: var(--semble-gray-500) !important;
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

.semble-availability__date-range {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--semble-gray-800);
    min-width: 200px;
}

/* Availability Content */
.semble-availability__content {
    display: flex;
    flex-direction: column;
    gap: var(--semble-spacing-xl);
}

/* Day Grid */
.semble-availability__day-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--semble-spacing-lg);
    margin-bottom: var(--semble-spacing-xl);
}

/* Day Cards - Apply blue info styling to available cards */
.semble-day-card {
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-left: 4px solid #ADE3DB;
    border-radius: var(--semble-radius-md);
    padding: var(--semble-spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--semble-transition);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--semble-spacing-sm);
    box-shadow: var(--semble-shadow-sm);
    position: relative;
    overflow: hidden;
}

.semble-day-card:hover:not(.semble-day-card--disabled) {
    border-color: #159D7B;
    transform: translateY(-2px);
    box-shadow: var(--semble-shadow-md);
}

.semble-day-card.selected {
    border-color: var(--semble-primary);
    background: #E8F5E8;
    border-left: 4px solid #48A999;
    box-shadow: 0 0 0 3px rgba(173, 227, 219, 0.3);
    transform: translateY(-1px);
}

/* Disabled cards keep original grey styling */
.semble-day-card--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--semble-gray-100);
    border: 2px solid var(--semble-gray-200);
    border-left: 2px solid var(--semble-gray-200); /* Override the green accent */
    box-shadow: none;
}

.semble-day-card--disabled:hover {
    transform: none;
    border-color: var(--semble-gray-200);
    box-shadow: none;
}

.semble-day-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    margin: 0;
}

.semble-day-card__date {
    font-size: 0.9rem;
    color: var(--semble-gray-500);
    margin: 0;
}

.semble-day-card__status {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--semble-gray-500);
    margin: 0;
}

.semble-day-card.selected .semble-day-card__status {
    color: var(--semble-primary);
}

/* Time Slots Container */
.semble-time-slots {
    display: flex;
    gap: 0;
    min-height: 380px;
    background: var(--semble-white);
    border-radius: var(--semble-radius-md);
    overflow: hidden;
    box-shadow: var(--semble-shadow-sm);
}

/* Time Slots Periods (Morning/Afternoon) */
.semble-time-slots__period {
    display: flex;
    flex-direction: column;
    padding: var(--semble-spacing-lg);
}

.semble-time-slots__period--morning {
    width: 38%;
    border-right: 1px solid var(--semble-gray-200);
}

.semble-time-slots__period--afternoon {
    width: 62%;
}

.semble-time-slots__period-title {
    margin: 0 0 var(--semble-spacing-sm) 0;
    color: var(--semble-gray-800);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* Time Slots Grid */
.semble-time-slots__grid {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 0;
    align-content: flex-start;
    overflow-x: hidden;
}

.semble-time-slots__grid::-webkit-scrollbar {
    width: 6px;
}

.semble-time-slots__grid::-webkit-scrollbar-track {
    background: var(--semble-gray-100);
    border-radius: 3px;
}

.semble-time-slots__grid::-webkit-scrollbar-thumb {
    background: var(--semble-gray-200);
    border-radius: 3px;
}

.semble-time-slots__grid::-webkit-scrollbar-thumb:hover {
    background: var(--semble-gray-500);
}

/* Time Slot Cards - Blue info styling to match other cards */
.semble-card--time-slot {
    background: #f8fbff;
    border: 1px solid #e3f2fd;
    border-left: 4px solid #ADE3DB;
    border-radius: var(--semble-radius-sm);
    padding: 8px 6px;
    cursor: pointer;
    transition: var(--semble-transition);
    text-align: center;
    height: 40px;
    width: 100px;
    min-width: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--semble-shadow-sm);
}

.semble-card--time-slot:hover {
    border-color: #159D7B;
    box-shadow: var(--semble-shadow-md);
    transform: translateY(-1px);
}

.semble-card--time-slot.selected {
    border-color: var(--semble-primary);
    background: #E8F5E8;
    border-left: 4px solid #48A999;
    box-shadow: 0 0 0 3px rgba(173, 227, 219, 0.3);
    transform: translateY(-1px);
}

.semble-card__time {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--semble-gray-800);
    margin: 0;
}

.semble-card--time-slot.selected .semble-card__time {
    color: var(--semble-primary);
}

/* Empty State Messages */
.semble-time-slots__grid p {
    text-align: center;
    color: var(--semble-gray-500);
    padding: var(--semble-spacing-lg);
    margin: 0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .semble-availability__day-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: var(--semble-spacing-md);
    }
    
    .semble-day-card {
        min-height: 100px;
        padding: var(--semble-spacing-md);
    }
    
    .semble-time-slots {
        flex-direction: column;
        height: auto;
    }
    
    .semble-time-slots__period--morning,
    .semble-time-slots__period--afternoon {
        width: 100%;
    }
    
    .semble-time-slots__period--morning {
        border-right: none;
        border-bottom: 1px solid var(--semble-color-border);
    }
    
    .semble-time-slots__grid {
        max-height: none;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        justify-items: center;
    }
    
    .semble-card--time-slot {
        width: 100%;
        min-width: unset;
        max-width: none;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes cardZoomIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   BOOKING CONFIRMATION
   ========================================================================== */

/* Booking confirmation container styling */
#semble-booking-confirmation {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.semble-booking-details {
  background: var(--semble-white);
  border-radius: var(--semble-radius-lg);
  box-shadow: var(--semble-shadow-md);
  padding: var(--semble-spacing-3xl);
  margin-bottom: var(--semble-spacing-2xl);
  display: flex;
  gap: var(--semble-spacing-3xl);
}

.semble-booking-details__single {
  flex: 1;
}

.semble-booking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--semble-spacing-xs) 0;
  margin-bottom: 0;
  font-size: 0.95em;
}

.semble-booking-row:last-child {
  margin-bottom: 0;
}

.semble-booking-row--compact {
  margin-top: 0;
  padding-top: 0;
}

.semble-booking-row strong {
  color: var(--semble-gray-700);
  font-weight: 600;
}

/* Apply compact formatting to all rows in single column */
.semble-booking-details__single .semble-booking-row {
  margin-top: 0;
  padding-top: 0;
}

/* Add space above practice name */
.semble-booking-details__single .semble-booking-row:nth-child(5) {
  margin-top: 0.5em;
}

/* Add space between patient name and date/time */
.semble-booking-details__single .semble-booking-row:nth-child(2) {
  margin-top: 0.5em;
}

/* Patient name styling - 10% bigger and bold */
.semble-booking-details__single .semble-booking-row:first-child {
  font-size: 1.1em;
  font-weight: 700;
}

.semble-booking-actions {
  display: flex;
  gap: var(--semble-spacing-lg);
  justify-content: center;
  align-items: center;
  margin-top: var(--semble-spacing-2xl);
  padding-top: var(--semble-spacing-xl);
  border-top: 1px solid var(--semble-gray-100);
}

/* Use global button styles - secondary button for cancel */
.semble-booking-actions .semble-button--secondary {
  background: var(--semble-gray-100) !important;
  color: var(--semble-gray-700) !important;
  border: 1px solid var(--semble-gray-300) !important;
}

.semble-booking-actions .semble-button--secondary:hover {
  background: var(--semble-gray-200) !important;
  color: var(--semble-gray-800) !important;
}

/* Responsive adjustments for booking confirmation */
@media (max-width: 768px) {
  .semble-booking-details {
    flex-direction: column;
    gap: var(--semble-spacing-lg);
  }
  
  .semble-booking-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--semble-spacing-xs);
  }
  
  .semble-booking-actions {
    flex-direction: column;
    gap: var(--semble-spacing-md);
  }
}

/* ==========================================================================
   BOOKING RESULT (SUCCESS/ERROR)
   ========================================================================== */

.semble-booking-result {
  text-align: center;
  padding: var(--semble-spacing-3xl);
  border-radius: var(--semble-radius-lg);
  margin-bottom: var(--semble-spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.semble-booking-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fbff 100%);
  border: 1px solid #ADE3DB;
  box-shadow: var(--semble-shadow-lg);
}

.semble-booking-error {
  background: var(--semble-red-50);
}

/* Success Header Styling */
.semble-success-header {
  margin-bottom: var(--semble-spacing-3xl);
}

.semble-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--semble-spacing-xl);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  animation: successPulse 2s ease-in-out infinite;
}

.semble-checkmark {
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  animation: checkmarkScale 0.6s ease-out 0.3s both;
}

.semble-success-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--semble-gray-800);
  margin: 0 0 var(--semble-spacing-sm) 0;
  letter-spacing: -0.025em;
}

.semble-success-subtitle {
  font-size: 1.1rem;
  color: var(--semble-gray-600);
  margin: 0;
  font-weight: 400;
}

/* Booking Summary Card */
.semble-booking-summary {
  margin: var(--semble-spacing-3xl) 0;
  padding: var(--semble-spacing-2xl);
  text-align: left;
}

.semble-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--semble-spacing-lg) 0;
  border-bottom: 1px solid #e8f4fd;
}

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

.semble-summary-row--highlight {
  background: linear-gradient(90deg, rgba(173, 227, 219, 0.1), rgba(173, 227, 219, 0.05));
  margin: 0 calc(-1 * var(--semble-spacing-2xl));
  padding: var(--semble-spacing-lg) var(--semble-spacing-2xl);
  border-radius: var(--semble-radius-sm);
  border-bottom: none;
}

.semble-summary-label {
  display: flex;
  align-items: center;
  gap: var(--semble-spacing-md);
  font-weight: 600;
  color: var(--semble-gray-700);
  font-size: 0.95rem;
}

.semble-summary-icon {
  font-size: 1.2rem;
  display: inline-block;
  width: 24px;
  text-align: center;
}

.semble-summary-value {
  font-weight: 500;
  color: var(--semble-gray-800);
  text-align: right;
  font-size: 0.95rem;
}

.semble-reference-code {
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  background: rgba(173, 227, 219, 0.2);
  padding: var(--semble-spacing-xs) var(--semble-spacing-sm);
  border-radius: var(--semble-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Next Steps Section */
.semble-next-steps {
  background: transparent;
  border-radius: var(--semble-radius-md);
  padding: var(--semble-spacing-lg);
  margin: var(--semble-spacing-lg) 0;
  text-align: left;
}

.semble-next-steps-title {
  color: var(--semble-gray-800);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--semble-spacing-lg) 0;
  display: flex;
  align-items: center;
  gap: var(--semble-spacing-sm);
}

.semble-next-steps-title::before {
  content: "📋";
  font-size: 1.2rem;
}

.semble-next-steps-list {
  margin: 0;
  padding-left: var(--semble-spacing-xl);
  list-style: none;
}

.semble-next-steps-list li {
  position: relative;
  padding: var(--semble-spacing-xs) 0;
  color: var(--semble-gray-700);
  line-height: 1.5;
}

.semble-next-steps-list li::before {
  content: "✓";
  position: absolute;
  left: -20px;
  color: var(--semble-primary);
  font-weight: bold;
  font-size: 0.9rem;
}

/* Next Steps Content - Support for configurable HTML content */
.semble-next-steps-content {
  color: var(--semble-gray-700);
  line-height: 1.5;
}

.semble-next-steps-content ul {
  margin: 0;
  padding-left: var(--semble-spacing-xl);
  list-style: none;
}

.semble-next-steps-content li {
  position: relative;
  padding: var(--semble-spacing-xs) 0;
}

.semble-next-steps-content li::before {
  content: "✓";
  position: absolute;
  left: -20px;
  color: var(--semble-primary);
  font-weight: bold;
  font-size: 0.9rem;
}

.semble-next-steps-content ol {
  margin: 0;
  padding-left: var(--semble-spacing-xl);
}

.semble-next-steps-content p {
  margin: var(--semble-spacing-sm) 0;
}

.semble-next-steps-content strong {
  color: var(--semble-gray-800);
}

/* Result Actions */
.semble-result-actions {
  margin-top: var(--semble-spacing-3xl);
  text-align: center;
}

.semble-result-actions .semble-button {
  margin: 0 var(--semble-spacing-sm);
  min-width: 120px;
}

/* Legacy styles for older result format */
.semble-result-icon {
  font-size: 1.2em;
  margin-bottom: 0;
}

.semble-booking-success .semble-result-icon {
  color: var(--semble-green-600);
}

.semble-booking-error .semble-result-icon {
  color: var(--semble-red-600);
}

.semble-booking-result h3 {
  font-size: var(--semble-text-lg);
  margin-bottom: var(--semble-spacing-md);
  color: var(--semble-gray-800);
  display: flex;
  align-items: center;
  gap: var(--semble-spacing-sm);
  justify-content: center;
  font-weight: 700;
}

.semble-result-details {
  background: var(--semble-white);
  border-radius: var(--semble-radius-md);
  padding: var(--semble-spacing-lg);
  margin: var(--semble-spacing-lg) 0;
  text-align: left;
}

.semble-result-details p {
  margin: var(--semble-spacing-xs) 0;
  color: var(--semble-gray-700);
}

.semble-result-message {
  margin: var(--semble-spacing-lg) 0;
  color: var(--semble-gray-600);
  line-height: 1.6;
}

/* Animations */
@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
  }
}

@keyframes checkmarkScale {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Design for Booking Result */
@media (max-width: 768px) {
  .semble-booking-result {
    padding: var(--semble-spacing-2xl) var(--semble-spacing-lg);
    margin: var(--semble-spacing-lg);
  }
  
  .semble-success-icon {
    width: 60px;
    height: 60px;
  }
  
  .semble-checkmark {
    font-size: 2rem;
  }
  
  .semble-success-title {
    font-size: 1.5rem;
  }
  
  .semble-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--semble-spacing-xs);
  }
  
  .semble-summary-value {
    text-align: left;
  }
  
  .semble-booking-summary {
    padding: var(--semble-spacing-lg);
  }
  
  .semble-summary-row--highlight {
    margin: 0 calc(-1 * var(--semble-spacing-lg));
    padding: var(--semble-spacing-lg);
  }
}

/* Loading spinner for booking process */
.semble-booking-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--semble-spacing-3xl);
  text-align: center;
}

.semble-booking-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--semble-gray-200);
  border-top: 3px solid var(--semble-primary);
  border-radius: 50%;
  animation: semble-spin 1s linear infinite;
  margin-bottom: var(--semble-spacing-lg);
}

.semble-booking-loading__text {
  color: var(--semble-gray-600);
  font-size: var(--semble-text-md);
  margin: 0;
}

@keyframes semble-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Availability loading spinner */
.semble-availability-loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--semble-gray-200);
  border-top: 4px solid var(--semble-primary);
  border-radius: 50%;
  animation: semble-spin 1s linear infinite;
  margin-bottom: 20px;
}
