/* Base Styles */
.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

.error-label {
  color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-control,
.form-select {
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Spacing */
.form-mt {
  margin-top: 1rem;
}

.form-array-1 {
  margin-top: 1.5rem;
}

.form-array {
  display: flex;
  align-items: flex-start;
  margin-top: 1rem;
}

.form-array input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

/* Mobile-First Responsive Design */
.appointment-form {
  width: 100%;
  position: relative;
}

/* Mobile Styles (default) */
@media (max-width: 575.98px) {
  .appointment-form {
    padding: 1rem !important;
  }

  .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
  }

  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.75rem !important;
  }

  .mobile-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .mobile-link {
    font-size: 0.85rem;
  }

  .mobile-label {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .mobile-btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem !important;
  }

  /* Stack all columns on very small screens */
  .col-12.col-sm-6 {
    margin-bottom: 0.5rem;
  }

  /* Improve touch targets */
  .form-control,
  .form-select,
  .btn {
    min-height: 44px;
  }

  /* Better spacing for mobile */
  .row.gy-3 {
    --bs-gutter-y: 1rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .appointment-form {
    padding: 1.5rem !important;
  }

  .form-label {
    font-size: 0.95rem;
  }

  .form-control,
  .form-select {
    font-size: 0.95rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .appointment-form {
    padding: 2rem !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .appointment-form {
    padding: 3rem !important;
  }
}

/* Focus styles for better accessibility */
.form-control:focus,
.form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Success state */
.success {
  border-color: #198754 !important;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

/* Date input specific styles */
input[type="date"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  padding: 0.3rem;
  cursor: pointer;
}

/* Checkbox alignment improvement */
.form-array {
  align-items: flex-start;
}

.form-array input[type="checkbox"] {
  flex-shrink: 0;
}

/* ===== SUCCESS MODAL STYLES ===== */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.success-modal-content {
  background: linear-gradient(135deg, #e8f0fe, #f0f7ff);
  border: 2px solid #1167f0;
  color: #0d4a9e;
  padding: 3rem 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  margin: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.success-modal .success-message h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1167f0 !important;
  font-size: 1.5rem;
}

.success-modal .success-message p {
  font-size: 1.1rem;
  margin-bottom: 0;
  line-height: 1.5;
  color: #0d4a9e;
}

.success-modal .success-icon {
  animation: bounceIn 0.8s ease-out;
  margin-bottom: 1rem;
}

.success-modal .success-icon i {
  color: #1167f0 !important;
  font-size: 3rem !important;
}

/* Hide the original success message in the form */
#successMessage {
  display: none !important;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile responsive success modal */
@media (max-width: 575.98px) {
  .success-modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .success-modal .success-message h4 {
    font-size: 1.25rem;
  }

  .success-modal .success-message p {
    font-size: 1rem;
  }

  .success-modal .success-icon i {
    font-size: 2.5rem !important;
  }
}

/* Tablet responsive */
@media (min-width: 576px) and (max-width: 991.98px) {
  .success-modal-content {
    padding: 2.5rem 2rem;
  }
}

.modal-btn {
}
