/* Application Form Styles */

/* Main Container */
.application-form-container {
  background-color: #f8f9fa;
  min-height: 100vh;
  padding: 40px 0;
}

.application-form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 40px;
  margin-bottom: 30px;
}

/* Progress Indicator - Modern Horizontal Design */
.application-progress {
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.progress-steps-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

/* Background line for all connections */
.progress-steps-container::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 60px;
  right: 60px;
  height: 4px;
  background: #e9ecef;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

/* Individual connecting lines between steps */
.progress-step::after {
  content: "";
  position: absolute;
  top: 30px;
  left: calc(50% + 30px);
  right: calc(-50% + 30px);
  height: 4px;
  background: #e9ecef;
  z-index: 1;
}

/* Hide the line after the last step */
.progress-step:last-child::after {
  display: none;
}

/* Hide the line on the first step (no line to the left) */
.progress-step:first-child::after {
  left: calc(50% + 30px);
}

/* Completed step connection */
.progress-step.completed::after {
  background: linear-gradient(90deg, #116e63 0%, #1a9883 100%);
}

/* Active step - half completed */
.progress-step.active::after {
  background: linear-gradient(
    90deg,
    #116e63 0%,
    #1a9883 50%,
    #e9ecef 50%,
    #e9ecef 100%
  );
}

/* Legacy progress-line elements (kept for compatibility) */
.progress-line {
  display: none;
}

/* Step Circle */
.step-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 4px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.step-circle .step-number {
  display: block;
  transition: all 0.3s ease;
}

.step-circle .step-check {
  display: none;
}

/* Active Step */
.progress-step.active .step-circle {
  background: linear-gradient(135deg, #fda31b 0%, #e89210 100%);
  color: white;
  border-color: #fda31b;
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(253, 163, 27, 0.4);
}

/* Completed Step */
.progress-step.completed .step-circle {
  background: linear-gradient(135deg, #116e63 0%, #0d5a51 100%);
  color: white;
  border-color: #116e63;
  box-shadow: 0 4px 12px rgba(17, 110, 99, 0.3);
}

.progress-step.completed .step-circle .step-number {
  display: none;
}

.progress-step.completed .step-circle .step-check {
  display: block;
  font-size: 24px;
}

/* Step Label */
.step-label {
  margin-top: 12px;
  font-size: 12px;
  color: #6c757d;
  text-align: center;
  font-weight: 500;
  max-width: 90px;
  line-height: 1.3;
  transition: all 0.3s ease;
}

.progress-step.active .step-label {
  color: #fda31b;
  font-weight: 700;
  font-size: 13px;
}

.progress-step.completed .step-label {
  color: #116e63;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .step-circle {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }

  .progress-step.active .step-circle {
    transform: scale(1.1);
  }

  .step-label {
    font-size: 10px;
    max-width: 70px;
  }

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

  .progress-steps-container::before {
    top: 22.5px;
    left: 45px;
    right: 45px;
    height: 3px;
  }

  .progress-step::after {
    top: 22.5px;
    height: 3px;
    left: calc(50% + 22.5px);
    right: calc(-50% + 22.5px);
  }

  .progress-step:first-child::after {
    left: calc(50% + 22.5px);
  }

  .application-progress {
    padding: 20px 10px;
  }
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

/* Step Header */
.step-header {
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 15px;
}

.step-title {
  color: #116e63;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-title i {
  opacity: 0.8;
  color: #fda31b;
}

/* Section Titles */
.section-title {
  color: #495057;
  font-size: 18px;
  font-weight: 600;
  border-left: 4px solid #116e63;
  padding-left: 15px;
  margin-bottom: 15px;
}

.section-title i {
  opacity: 0.7;
  color: #fda31b;
}

/* Form Elements */
.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.form-label.required::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

.form-control,
.form-select {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  padding: 10px 14px;
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #116e63;
  box-shadow: 0 0 0 0.2rem rgba(17, 110, 99, 0.15);
}

.form-control[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

.form-text {
  font-size: 13px;
  color: #6c757d;
  margin-top: 6px;
}

.invalid-feedback {
  font-size: 13px;
}

/* Checkboxes */
.form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  padding-left: 8px;
  line-height: 1.6;
}

/* File Upload */
input[type="file"].form-control {
  padding: 8px 12px;
}

/* Navigation Buttons */
.form-navigation {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.navigation-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.nav_left,
.nav_center,
.nav_right {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav_left {
  justify-content: flex-start;
}

.nav_center {
  justify-content: center;
}

.nav_right {
  justify-content: flex-end;
}

.step-indicator {
  font-size: 15px;
  color: #495057;
  font-weight: 500;
  text-align: center;
}

.step-indicator strong {
  color: #116e63;
  font-size: 18px;
  font-weight: 700;
}

.btn {
  padding: 12px 32px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn i {
  margin-right: 8px;
}

.btn:last-child i {
  margin-right: 0;
  margin-left: 8px;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background-color: #fda31b;
  border-color: #fda31b;
  color: white;
}

.btn-primary:hover {
  background-color: #e89210;
  border-color: #d68410;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(253, 163, 27, 0.3);
}

.btn-success {
  background-color: #116e63;
  border-color: #116e63;
}

.btn-success:hover {
  background-color: #0d5a51;
  border-color: #0b4d44;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(17, 110, 99, 0.3);
}

/* Alerts */
.alert {
  border-radius: 6px;
  border: none;
  padding: 15px 20px;
}

.alert i {
  font-size: 18px;
}

/* Conditional Sections */
.o-level-section,
.a-level-section,
.land-details-section {
  transition: opacity 0.3s ease;
}

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

  .progress-indicator {
    margin-bottom: 35px;
  }

  .navigation-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav_left,
  .nav_center,
  .nav_right {
    width: 100%;
    justify-content: center;
  }

  .nav_center {
    order: -1;
  }

  .step-indicator {
    font-size: 14px;
  }

  .step-indicator strong {
    font-size: 16px;
  }

  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .step-circle i {
    font-size: 16px;
  }

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

  .step-title {
    font-size: 20px;
  }

  .section-title {
    font-size: 16px;
  }

  .btn {
    width: 100%;
    padding: 12px 24px;
  }
}

@media (max-width: 576px) {
  .progress-indicator {
    flex-wrap: wrap;
    gap: 15px;
  }

  .progress-indicator::before {
    display: none;
  }

  .progress-step {
    flex: 0 0 calc(33.333% - 10px);
  }

  .step-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

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

/* Loading Spinner */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  right: 15px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Form Validation States */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: #116e63;
}

/* Success/Error Messages */
.submission-message {
  text-align: center;
  padding: 60px 20px;
}

.submission-message i {
  font-size: 64px;
  margin-bottom: 25px;
}

.submission-message h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}

.submission-message p {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 30px;
}
