/* Booking Modal & Flow Styles */

/* Modal Overlay */
.booking-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

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

/* Modal Container */
.booking-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

/* Close Button */
.booking-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(0, 0, 0, 0.2);
  color: #333;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.booking-modal-close:hover {
  background: #056abc;
  border-color: #056abc;
  color: #fff;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Progress Indicator */
.booking-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px 30px;
  border-bottom: 1px solid #eee;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
  opacity: 1;
}

.progress-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
  background: #056abc;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(123, 153, 179, 0.2);
}

.progress-step.completed .progress-circle {
  background: #4caf50;
  color: #fff;
}

.progress-step.completed .progress-circle::before {
  content: '\2713';
  font-weight: bold;
}

.progress-step span {
  font-size: 13px;
  font-weight: 500;
  color: #666;
}

.progress-step.active span {
  color: #056abc;
  font-weight: 600;
}

.progress-line {
  width: 80px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 10px 25px;
}

.progress-step.completed ~ .progress-line {
  background: #4caf50;
}

/* Modal Header */
.booking-modal-header {
  padding: 30px 60px 20px;
  text-align: center;
}

.booking-modal-header h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.booking-modal-header p {
  font-size: 16px;
  color: #666;
}

/* Modal Body */
.booking-modal-body {
  padding: 0px 60px 20px 60px;
  min-height: 400px;
}

.booking-step {
  display: none;
}

.booking-step-content h3 {
  font-size: 22px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

/* Loading State */
.booking-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.booking-loader .spinner-border {
  width: 3rem;
  height: 3rem;
  border: 0.3rem solid #f0f0f0;
  border-right-color: #056abc;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.booking-loader p {
  margin-top: 15px;
  font-size: 16px;
  color: #666;
}

/* Error State */
.booking-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.booking-error i {
  font-size: 48px;
  color: #056abc;
  margin-bottom: 15px;
  opacity: 0.8;
}

.booking-error p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

/* Date Selection Grid */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 25px;
  padding: 10px;
}

.date-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #056abc 0%, #056abc 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.date-card:hover {
  border-color: #056abc;
  background: linear-gradient(135deg, #fff5ee 0%, #ffffff 100%);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 24px rgba(207, 95, 38, 0.25);
}

.date-card:hover::before {
  transform: scaleX(1);
}

.date-card.selected {
  background: linear-gradient(135deg, #056abc 0%, #056abc 100%);
  border-color: #056abc;
  color: #fff;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 32px rgba(123, 153, 179, 0.4);
}

.date-card.selected::before {
  transform: scaleX(1);
  background: rgba(255, 255, 255, 0.3);
  height: 100%;
}

.date-day {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.date-card.selected .date-day {
  opacity: 0.9;
}

.date-number {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.date-card.selected .date-number {
  background: #fff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.date-month {
  font-size: 14px;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.date-card.selected .date-month {
  opacity: 0.95;
  color: #fff;
}

/* Selected Date Display */
.selected-date-display {
  background: #f8f9fa;
  color: #333;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 16px;
}

/* Time Slots Grid */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 25px;
  padding: 10px;
}

.time-slot-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  padding: 20px 18px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.time-slot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #056abc 0%, #056abc 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.time-slot-card:hover {
  border-color: #056abc;
  background: linear-gradient(135deg, #7b99b32d 0%, #ffffff 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(123, 153, 179, 0.25);
}

.time-slot-card:hover::before {
  transform: scaleY(1);
}

.time-slot-card.selected {
  background: linear-gradient(135deg, #056abc 0%, #056abc 100%);
  border-color: #056abc;
  color: #fff;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 28px rgba(123, 153, 179, 0.4);
}

.time-slot-card.selected::before {
  transform: scaleY(1);
  background: rgba(255, 255, 255, 0.2);
}

.time-slot-time {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c3e50;
}

.time-slot-time i {
  font-size: 18px;
  color: #056abc;
}

.time-slot-card.selected .time-slot-time i {
  color: rgba(255, 255, 255, 0.9);
}

.time-slot-provider {
  font-size: 14px;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-weight: 500;
}

.time-slot-provider i {
  font-size: 14px;
}

.time-slot-card.selected .time-slot-time,
.time-slot-card.selected .time-slot-provider {
  color: #fff;
}

/* Booking Summary */
.booking-summary {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.summary-item i {
  font-size: 24px;
  color: #056abc;
  width: 30px;
  flex-shrink: 0;
}

.summary-item div {
  flex: 1;
}

.summary-item label {
  display: block;
  font-size: 13px;
  color: #999;
  margin-bottom: 5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-item p {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  margin: 0;
}

/* Booking Notes */
.booking-notes {
  margin-bottom: 25px;
}

.booking-notes label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.booking-notes textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.booking-notes textarea:focus {
  outline: none;
  border-color: #056abc;
}

/* Booking Actions */
.booking-actions {
  text-align: start;
}

/* Success State */
.booking-success {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  margin-bottom: 20px;
}

.success-icon i {
  font-size: 80px;
  color: #4caf50;
}

.booking-success h3 {
  font-size: 28px;
  color: #4caf50;
  margin-bottom: 15px;
  font-weight: 600;
}

.booking-success > p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.booking-success .booking-summary {
  text-align: left;
  margin-bottom: 30px;
}

/* Modal Footer */
.booking-modal-footer {
  padding: 0px 60px 30px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

/* Responsive Styles */
@media only screen and (max-width: 767px) {
  .booking-modal {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 15px;
  }

  .booking-progress {
    padding: 30px 20px 20px;
  }

  .progress-circle {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .progress-step span {
    font-size: 11px;
  }

  .progress-line {
    width: 40px;
    margin: 0 5px 20px;
  }

  .booking-modal-header {
    padding: 20px 30px 15px;
  }

  .booking-modal-header h2 {
    font-size: 22px;
  }

  .booking-modal-header p {
    font-size: 14px;
  }

  .booking-modal-body {
    padding: 15px 30px 30px;
    min-height: 300px;
  }

  .booking-step-content h3 {
    font-size: 18px;
  }

  .dates-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .date-card {
    padding: 15px 10px;
  }

  .date-number {
    font-size: 24px;
  }

  .time-slots-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .booking-modal-footer {
    padding: 15px 30px 30px;
    flex-direction: column;
  }

  .booking-modal-close {
    width: 35px;
    height: 35px;
    font-size: 18px;
    top: 15px;
    right: 15px;
  }

  .summary-item {
    padding: 12px 0;
  }

  .summary-item i {
    font-size: 20px;
    width: 25px;
  }

  .summary-item label {
    font-size: 12px;
  }

  .summary-item p {
    font-size: 14px;
  }

  .success-icon i {
    font-size: 60px;
  }

  .booking-success h3 {
    font-size: 22px;
  }
}
