/* BOOKING MODAL (Extracted for Service Pages) */
.booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.booking-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.booking-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  max-width: 440px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.booking-modal::-webkit-scrollbar {
  width: 6px;
}
.booking-modal::-webkit-scrollbar-track {
  background: transparent;
}
.booking-modal::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 6px;
}
.booking-modal::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

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

.booking-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--duration-fast);
  z-index: 30;
}

.booking-modal__close:hover {
  color: var(--text-primary);
}

.booking-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  z-index: 20;
  border-bottom: 1px solid var(--border-glass);
}

.booking-progress__segment {
  height: 4px;
  flex: 1;
  background: var(--border-glass);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.booking-progress__segment-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 0.4s ease;
  opacity: 0.5;
}

.booking-progress__segment.completed .booking-progress__segment-fill {
  width: 100%;
  opacity: 1;
}

.booking-progress__segment.active .booking-progress__segment-fill {
  width: 100%;
  opacity: 1;
}

.booking-progress__shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  display: none;
}

.booking-progress__segment.active .booking-progress__shimmer {
  display: block;
  animation: progressShimmer 1.5s infinite linear;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.booking-progress__dots {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.booking-progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--duration-fast);
  background: var(--bg-secondary);
}

.booking-progress__dot.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.booking-progress__dot.completed {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.booking-steps {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.booking-step {
  display: none;
}

.booking-step.active {
  display: block;
  animation: stepFadeIn var(--duration-normal) var(--ease-out-expo);
}

.booking-step h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Calendar */
.calendar {
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1rem;
}

.calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar__month {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
}

.calendar__nav {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar__nav:hover {
  background: var(--surface-glass);
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--duration-fast);
}

.calendar__day:hover:not(.disabled):not(.selected) {
  background: var(--surface-glass);
}

.calendar__day.selected {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
}

.calendar__day.today {
  border: 1px solid var(--accent-primary);
}

.calendar__day.disabled {
  color: var(--text-muted);
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar__day.other-month {
  opacity: 0.2;
}

/* Time Picker (Scroll Wheel) */
.timepicker-body {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
  height: 220px;
  margin-top: 1.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}
.timepicker-lens {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 48px;
  transform: translateY(-50%);
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}
.timepicker-col {
  flex: 1;
  max-width: 120px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 86px 0; /* (220 - 48)/2 */
  z-index: 1;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.timepicker-col::-webkit-scrollbar {
  display: none;
}
.timepicker-item {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  scroll-snap-align: center;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-family: var(--font-display);
}
.timepicker-item.selected {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.booking-timezone {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
  display: block;
}

/* Booking Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--duration-fast);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
}

.booking-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.booking-nav .btn {
  flex: 1;
}

/* RTL Support */
body.lang-ar .booking-step h3[data-i18n] {
  text-align: center;
}

body.lang-ar .booking-progress {
  direction: rtl;
}

body.lang-ar .booking-progress__segment-fill {
  left: auto;
  right: 0;
}

body.lang-ar .booking-progress__shimmer {
  background: linear-gradient(to left, transparent, rgba(255,255,255,0.4), transparent);
}

body.lang-ar .booking-progress__segment.active .booking-progress__shimmer {
  animation: progressShimmerRtl 1.5s infinite linear;
}

@keyframes progressShimmerRtl {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

body.lang-ar .booking-nav {
  direction: rtl;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .booking-modal {
    padding: 1rem 0.75rem;
    width: 95%;
    max-height: 95svh;
  }
  
  .booking-modal__close {
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
  }
  
  .booking-step h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }
  
  .calendar {
    padding: 0.5rem;
  }
  
  .calendar__header {
    margin-bottom: 0.25rem;
  }
  
  .calendar__month {
    font-size: 0.9rem;
  }
  
  .calendar__nav {
    width: 32px;
    height: 32px;
  }
  
  .calendar__weekdays {
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
  }
  
  .calendar__days {
    gap: 2px;
  }
  
  .calendar__day {
    aspect-ratio: auto;
    height: 32px;
    font-size: 0.8rem;
    border-radius: 6px;
  }
  
  .timepicker-body {
    height: 120px;
    margin-top: 0.5rem;
  }
  
  .timepicker-lens {
    height: 36px;
  }
  
  .timepicker-col {
    padding: 42px 0; /* (120 - 36)/2 */
  }
  
  .timepicker-item {
    height: 36px;
    font-size: 1rem;
  }
  
  .timepicker-item.selected {
    font-size: 1.25rem;
  }
  
  .booking-nav {
    margin-top: 1rem;
  }
  
  .booking-progress {
    padding: 0.75rem;
  }
  
  #step1-next {
    margin-top: 1rem !important;
  }
}
