/* Advanced Booking System Styles */

/* Modal Base Styles */
.booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  font-family: "Inter", sans-serif;
}

/* Global text color override for booking modal */
.booking-modal * {
  color: #000000 !important;
}

.booking-modal h1,
.booking-modal h2,
.booking-modal h3,
.booking-modal h4,
.booking-modal h5,
.booking-modal h6 {
  color: #000000 !important;
  font-weight: 600 !important;
}

.booking-modal p,
.booking-modal span,
.booking-modal div,
.booking-modal label,
.booking-modal strong {
  color: #000000 !important;
}

.booking-modal input,
.booking-modal textarea,
.booking-modal select {
  color: #000000 !important;
  background: #ffffff !important;
}

.booking-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.booking-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Header */
.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, var(--color-primary), #e6c896);
  color: white;
  border-radius: 16px 16px 0 0;
}

.booking-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Progress Bar */
.booking-progress {
  padding: 24px 32px;
  background: #f9fafb;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #e6c896);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.progress-steps .step {
  color: #6b7280;
  font-weight: 500;
  transition: color 0.2s;
}

.progress-steps .step.active {
  color: var(--color-primary);
  font-weight: 600;
}

.progress-steps .step.completed {
  color: #059669;
}

/* Step Content */
.booking-content {
  padding: 32px;
  min-height: 400px;
}

.booking-step h3 {
  margin: 0 0 24px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

/* Service Selection */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.service-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.service-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #fff8f0, #fef3e2);
  box-shadow: 0 4px 12px rgba(212, 175, 122, 0.3);
}

.service-image {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f3f4f6;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-info h4 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.service-description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.service-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.service-details .duration {
  color: #6b7280;
}

.service-details .price {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1rem;
}

/* Doctor Selection */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.doctor-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.doctor-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.doctor-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #fff8f0, #fef3e2);
  box-shadow: 0 4px 12px rgba(212, 175, 122, 0.3);
}

.doctor-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  background: #f3f4f6;
}

.doctor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-info {
  text-align: center;
}

.doctor-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.doctor-title {
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.doctor-bio {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.doctor-rating {
  color: #059669;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Date & Time Selection */
.datetime-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}

/* Calendar */
.calendar-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.calendar-header button:hover {
  background: #f3f4f6;
}

.calendar-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.calendar-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-day-names span {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  padding: 10px 4px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-date {
  text-align: center;
  padding: 12px 6px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  border: 2px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calendar-date.available:hover {
  background: #fef3e2;
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calendar-date.selected {
  background: linear-gradient(135deg, var(--color-primary), #e6c896);
  color: white;
  font-weight: 700;
  border: 2px solid #c19a5a;
  box-shadow: 0 4px 12px rgba(212, 175, 122, 0.4);
  transform: scale(1.05);
  position: relative;
}

.calendar-date.selected::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.6rem;
  font-weight: bold;
  color: white;
  background: #059669;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-date.disabled {
  background: #f9fafb;
  color: #9ca3af;
  border-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

.calendar-date.empty {
  cursor: default;
  background: transparent;
  border: none;
  box-shadow: none;
}

.calendar-date.weekend {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Field Error Styling */
.field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error-message {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
}

/* Enhanced Form Styling */
.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 122, 0.1);
}

.auth-form input.field-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Calendar Date Cursor Fix */
.calendar-date:not(.disabled):not(.empty) {
  cursor: pointer;
}

.calendar-date.disabled,
.calendar-date.weekend {
  cursor: not-allowed;
}

.calendar-date.empty {
  cursor: default;
}

/* Time Slots */
.time-slots-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.time-slots-container h4 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.time-slot {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.time-slot:hover {
  border-color: var(--color-primary);
  background: #fef3e2;
}

.time-slot.selected {
  background: linear-gradient(135deg, var(--color-primary), #e6c896);
  border: 2px solid #c19a5a;
  color: white;
  font-weight: 700;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(212, 175, 122, 0.4);
  position: relative;
}

.time-slot.selected::before {
  content: "✓";
  position: absolute;
  top: -6px;
  right: -6px;
  background: #059669;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.no-date-selected,
.no-slots {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 32px;
}

/* User Authentication */
.user-auth-options {
  max-width: 500px;
  margin: 0 auto;
}

.auth-tabs {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: #6b7280;
  text-align: center;
  letter-spacing: 0.025em;
}

.auth-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.auth-tab:hover:not(.active) {
  color: #374151;
  background: rgba(255, 255, 255, 0.5);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-form input,
.auth-form textarea {
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-form input:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 122, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin: 8px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  border-color: var(--color-primary);
  background: #fefaf5;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  transform: scale(1.1);
  accent-color: var(--color-primary);
}

.checkbox-label a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.forgot-password {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  text-align: center;
  display: block;
  margin-top: 12px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  text-decoration: underline;
  color: #c19a5a;
}

.guest-notice {
  background: linear-gradient(135deg, #fef3e2, #fef7ed);
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 16px;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Enhanced Button Styling */
.auth-form .btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #e6c896);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(212, 175, 122, 0.3);
  margin-top: 8px;
}

.auth-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 122, 0.4);
  background: linear-gradient(135deg, #c19a5a, var(--color-primary));
}

.auth-form .btn-primary:active {
  transform: translateY(0);
}

/* Booking Summary */
.booking-summary {
  background: #f9fafb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}

.summary-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.summary-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.summary-section h4 {
  margin: 0 0 8px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item strong {
  font-weight: 600;
  color: #1f2937;
}

.summary-item span {
  font-size: 0.875rem;
  color: #6b7280;
}

.summary-section.pricing {
  text-align: center;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  background: white;
}

.price-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 8px;
}

/* Navigation */
.booking-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.booking-navigation button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: #c19a5a;
}

.btn-success {
  background: #059669;
  color: white;
}

.btn-success:hover {
  background: #047857;
}

/* Loading Overlay */
.booking-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.booking-loading p {
  color: #6b7280;
  font-weight: 500;
}

/* Notifications */
.booking-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10002;
  max-width: 400px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s ease;
  font-size: 14px;
  line-height: 1.4;
  border: 2px solid transparent;
}

.booking-notification.success {
  background: #059669;
  border-color: #10b981;
}

.booking-notification.error {
  background: #dc2626;
  border-color: #ef4444;
}

.booking-notification.info {
  background: #2563eb;
  border-color: #3b82f6;
}

.booking-notification button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading and Error States */
.loading,
.error,
.no-services,
.no-doctors {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

.error {
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  .booking-modal-content {
    margin: 10px;
    max-height: 95vh;
  }

  .booking-header,
  .booking-content,
  .booking-navigation {
    padding: 16px 20px;
  }

  .services-grid,
  .doctors-grid {
    grid-template-columns: 1fr;
  }

  .datetime-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-tabs {
    flex-direction: column;
  }

  .booking-navigation {
    flex-direction: column;
    gap: 12px;
  }

  .booking-navigation button {
    width: 100%;
  }

  .progress-steps {
    font-size: 0.75rem;
  }

  .progress-steps .step {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .calendar-dates {
    gap: 2px;
  }

  .calendar-date {
    padding: 8px 2px;
    font-size: 0.75rem;
  }

  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
}

 
 