/* MediCare Clinic - Appointments Page Styles */

/* Appointment Form Section */
.appointment-section {
  background: var(--light-gray);
  padding: 80px 0;
}

.appointment-container {
  max-width: 900px;
  margin: 0 auto;
}

.appointment-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-gray);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 20px;
  left: 0;
  height: 2px;
  background: var(--secondary-green);
  transition: width 0.3s ease;
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--border-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-gray);
  transition: all 0.3s;
}

.step.active .step-number {
  background: var(--secondary-green);
  border-color: var(--secondary-green);
  color: var(--white);
}

.step.completed .step-number {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: var(--white);
}

.step-label {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 500;
  text-align: center;
}

.step.active .step-label {
  color: var(--dark-text);
  font-weight: 600;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeInStep 0.4s ease;
}

.form-step.active {
  display: block;
}

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

.step-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark-text);
}

.step-description {
  font-size: 15px;
  color: var(--text-gray);
  margin-bottom: 30px;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-label.required::after {
  content: ' *';
  color: var(--accent-red);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Open Sans', sans-serif;
  transition: all 0.3s;
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

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

.form-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.form-input.error,
.form-select.error {
  border-color: var(--accent-red);
}

.form-input.error + .form-error {
  display: block;
}

/* Service Selection Grid */
.service-selection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.service-option {
  position: relative;
}

.service-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.service-card-option {
  padding: 20px;
  border: 2px solid var(--border-gray);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
}

.service-option input[type="radio"]:checked + .service-card-option {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.service-icon-small {
  width: 50px;
  height: 50px;
  background: var(--light-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.service-icon-small svg {
  stroke: var(--primary-blue);
  transition: all 0.3s ease;
}

.service-option input[type="radio"]:checked + .service-card-option .service-icon-small {
  background: var(--primary-blue);
}

.service-option input[type="radio"]:checked + .service-card-option .service-icon-small svg {
  stroke: var(--white);
}

.service-text-small h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--dark-text);
}

.service-text-small p {
  font-size: 13px;
  color: var(--text-gray);
}

/* Doctor Selection */
.doctor-selection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.doctor-option {
  position: relative;
}

.doctor-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.doctor-card-small {
  padding: 20px;
  border: 2px solid var(--border-gray);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: var(--white);
}

.doctor-option input[type="radio"]:checked + .doctor-card-small {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.doctor-avatar-small {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.doctor-card-small h4 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--dark-text);
}

.doctor-card-small p {
  font-size: 12px;
  color: var(--text-gray);
}

/* Date & Time Selection */
.datetime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.date-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.date-option {
  padding: 12px 8px;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--white);
}

.date-option:hover {
  border-color: var(--primary-blue);
}

.date-option.selected {
  border-color: var(--primary-blue);
  background: var(--light-blue);
}

.date-day {
  font-size: 11px;
  color: var(--text-gray);
  margin-bottom: 4px;
}

.date-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-text);
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.time-slot {
  padding: 14px;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 15px;
  background: var(--white);
}

.time-slot:hover {
  border-color: var(--primary-blue);
}

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

.time-slot.unavailable {
  background: var(--light-gray);
  color: var(--text-gray);
  cursor: not-allowed;
  opacity: 0.5;
}

/* Summary */
.summary-card {
  background: var(--light-blue);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 119, 182, 0.2);
}

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

.summary-label {
  font-weight: 600;
  color: var(--dark-text);
}

.summary-value {
  color: var(--primary-blue);
  font-weight: 600;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  gap: 16px;
}

.btn-back {
  background: var(--light-gray);
  color: var(--dark-text);
}

.btn-back:hover {
  background: var(--border-gray);
}

/* Success Message */
.success-card {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--secondary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin: 0 auto 30px;
  color: var(--white);
}

.success-icon svg {
  stroke: var(--white);
}

.success-card h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--dark-text);
}

.success-card p {
  font-size: 16px;
  color: var(--text-gray);
  margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .appointment-form-card {
    padding: 30px 20px;
  }

  .progress-steps {
    flex-wrap: wrap;
    gap: 20px;
  }

  .step-label {
    font-size: 11px;
  }

  .service-selection,
  .doctor-selection {
    grid-template-columns: 1fr;
  }

  .datetime-grid {
    grid-template-columns: 1fr;
  }

  .date-picker {
    grid-template-columns: repeat(4, 1fr);
  }

  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-navigation {
    flex-direction: column-reverse;
  }
}
