/* ========= VISA APPLICATION FORM STYLES ========= */
/* Professional production-ready styles for visa application page */

.visa-application-form {
  max-width: 800px;
  margin: 120px auto 60px auto; /* Account for fixed navbar */
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-family: 'Montserrat', sans-serif;
}

.visa-application-form h1 {
  text-align: center;
  color: #2c3e50;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #589ecce8;
}

/* Form Sections */
.form-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #589ecce8;
}

.form-section h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.form-section h2::before {
  content: "📋";
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
  font-family: 'Montserrat', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #589ecce8;
  box-shadow: 0 0 0 3px rgba(88, 158, 204, 0.1);
  transform: translateY(-1px);
}

.form-group input[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
  color: #6c757d;
}

/* Form Rows */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Error Messages */
.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
  font-weight: 500;
}

/* Form Actions */
.form-actions {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e1e5e9;
}

.submit-btn {
  background: linear-gradient(135deg, #589ecce8 0%, #4a7ba7 100%);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(88, 158, 204, 0.3);
  font-family: 'Montserrat', sans-serif;
  min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 158, 204, 0.4);
}

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Visa Type Selection Styling */
#visa_type {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

/* Date Inputs */
input[type="date"] {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(0.5);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Loading States */
.form-group.loading input,
.form-group.loading select {
  position: relative;
}

.form-group.loading input::after,
.form-group.loading select::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #589ecce8;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Success States */
.form-group.success input,
.form-group.success select {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .visa-application-form {
    margin: 100px 1rem 40px 1rem;
    padding: 1.5rem;
  }

  .visa-application-form h1 {
    font-size: 1.8rem;
  }

  .form-section {
    padding: 1rem;
  }

  .form-section h2 {
    font-size: 1.3rem;
  }

  .submit-btn {
    width: 100%;
    padding: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .visa-application-form {
    margin: 90px 0.5rem 30px 0.5rem;
    padding: 1rem;
  }

  .visa-application-form h1 {
    font-size: 1.6rem;
  }

  .form-section h2 {
    font-size: 1.1rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}

/* Print Styles */
@media print {
  .visa-application-form {
    box-shadow: none;
    margin: 0;
    max-width: none;
  }

  .submit-btn {
    display: none;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .form-group input,
  .form-group select,
  .submit-btn {
    transition: none;
  }

  .form-group input:focus,
  .form-group select:focus {
    transform: none;
  }

  .submit-btn:hover:not(:disabled) {
    transform: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .visa-application-form {
    border: 2px solid #000;
  }

  .form-section {
    border: 1px solid #000;
    border-left: 4px solid #000;
  }

  .submit-btn {
    border: 2px solid #000;
  }
}

/* Focus Visible for Better Accessibility */
.form-group input:focus-visible,
.form-group select:focus-visible,
.submit-btn:focus-visible {
  outline: 2px solid #589ecce8;
  outline-offset: 2px;
}
