/* css/booking_form.css */
:root {
  --primary-color: #1a73e8;
  --primary-hover: #0d47a1;
  --accent-color: #43a047;
  --text-color: #333;
  --light-text: #757575;
  --border-color: #e0e0e0;
  --error-color: #d32f2f;
  --success-color: #4caf50;
  --background-color: #f9f9f9;
  --card-background: #ffffff;
  --disabled-bg: #f5f5f5;
  --disabled-text: #9e9e9e;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.header {
  padding: 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  text-align: center;
}

.header h1 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.business-hours {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  display: inline-block;
}

.business-hours h3 {
  margin-bottom: 10px;
  text-align: center;
}

.hours-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.hour-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.form-container {
  padding: 30px;
  position: relative;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  transform: translateY(-50%);
  z-index: 1;
}

.progress-step {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--disabled-bg);
  color: var(--disabled-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.progress-step.active {
  background-color: var(--primary-color);
  color: white;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step h2 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.step p {
  margin-bottom: 20px;
  color: var(--light-text);
}

.service-dropdown {
  margin-bottom: 30px;
}

.service-category {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.service-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
}

.service-option-group {
  font-weight: bold;
  color: var(--primary-color);
}

.calendar-container {
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
}

.calendar-title {
  font-weight: bold;
  font-size: 18px;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-nav-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  background-color: #f5f5f5;
  border-bottom: 1px solid var(--border-color);
}

.calendar-weekdays div {
  padding: 10px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: #f0f0f0;
}

.calendar-day {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: white;
  transition: all 0.2s;
}

.calendar-day:hover:not(.disabled) {
  background-color: #e3f2fd;
}

.calendar-day.selected {
  background-color: var(--primary-color);
  color: white;
}

.calendar-day.disabled {
  color: var(--disabled-text);
  background-color: var(--disabled-bg);
  cursor: not-allowed;
}

.time-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 30px;
}

.time-slot {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--primary-color);
  background-color: #e3f2fd;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.btn-container {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s;
}

.btn-prev {
  background-color: #f5f5f5;
  color: var(--text-color);
}

.btn-prev:hover {
  background-color: #e0e0e0;
}

.btn-next, .btn-submit {
  background-color: var(--primary-color);
  color: white;
}

.btn-next:hover, .btn-submit:hover {
  background-color: var(--primary-hover);
}

.btn:disabled {
  background-color: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}

.confirmation {
  display: none;
  text-align: center;
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

.confirmation-icon {
  font-size: 60px;
  color: var(--success-color);
  margin-bottom: 20px;
}

.confirmation-details {
  margin-top: 30px;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  text-align: left;
}

.confirmation-details h3 {
  margin-bottom: 15px;
  text-align: center;
  color: var(--primary-color);
}

.detail-item {
  display: flex;
  margin-bottom: 10px;
}

.detail-label {
  font-weight: bold;
  width: 100px;
}

/* Responsiveness */
@media (max-width: 768px) {
  .header {
    padding: 20px;
  }
  
  .form-container {
    padding: 20px;
  }
  
  .business-hours {
    width: 100%;
  }
  
  .time-container {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .btn {
    padding: 10px 16px;
  }
}

/* Error display */
.error-message {
  color: var(--error-color);
  margin-top: 5px;
  font-size: 14px;
}

.input-error {
  border-color: var(--error-color);
}

/* Loading indicators */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

.loading-text {
  color: white;
  margin-top: 10px;
  font-weight: bold;
}

 /* Additional styling for new features */
 .calendar-nav-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.redirect-message {
  margin-top: 20px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

/* Fix for time slot display */
.time-slot {
  display: inline-block;
  margin: 5px;
  padding: 10px 30px;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-slot:hover {
  background-color: #f5f5f5;
}

.time-slot.selected {
  background-color: #4caf50;
  color: white;
  border-color: #4caf50;
}

.no-slots-message {
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
  color: #666;
  text-align: center;
  margin-top: 15px;
}

/* Make confirmation screen clearly visible */
.confirmation {
  display: none;
  text-align: center;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.confirmation-icon {
  font-size: 48px;
  color: #4caf50;
  margin-bottom: 20px;
}

.confirmation-details {
  text-align: left;
  margin-top: 30px;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.detail-item {
  margin-bottom: 10px;
  display: flex;
}

.detail-label {
  font-weight: bold;
  margin-right: 10px;
  min-width: 80px;
}

/* Additional CSS for validation styling */
.error-message {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

input.invalid {
  border-color: #e53e3e;
  background-color: #fff5f5;
}

/* Helpful styling for form elements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.form-control:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control.invalid:focus {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Optional - Add this to your existing CSS */
.validation-info {
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 0.25rem;
}