/* ------------------------- */
/* Container */
/* ------------------------- */
.modern-form {
  max-width: 600px;
  margin: 20px auto;
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 20px;
  position: relative; 
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ------------------------- */
/* Stepper Circles & Lines */
/* ------------------------- */
.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 20px;
}

.stepper .step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stepper .step.active {
  background: #0072B1;
  color: #fff;
  transform: scale(1.2);
}

.stepper .step.completed {
  background: #00c4ff;
  color: #fff;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 4px;
  background: #f0f0f0;
  z-index: 0;
  transform: translateY(-50%);
  border-radius: 2px;
}

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

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

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

/* ------------------------- */
/* Labels & Inputs */
/* ------------------------- */
.form-step label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.form-step input,
.form-step select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  height: 46px;
  background-color: #fff;
  appearance: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-step input:focus,
.form-step select:focus {
  border-color: #0072B1;
  box-shadow: 0 0 6px rgba(0, 114, 177, 0.3);
  outline: none;
}

/* ------------------------- */
/* Buttons (Next / Prev / Submit) */
/* ------------------------- */
.next-btn, .prev-btn, .submit-btn {
  display: inline-block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  background: #0072B1;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 20px; /* Added top margin for spacing */
}

.next-btn:hover, .prev-btn:hover, .submit-btn:hover {
  background: #005a85;
  transform: translateY(-2px);
}

.next-btn:disabled, .prev-btn:disabled, .submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Button Row */
.form-step .button-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px; /* top margin for better spacing */
}

/* ------------------------- */
/* Progress Bar */
/* ------------------------- */
.progress-container {
  width: 100%;
  background: #f3f3f3;
  height: 8px;
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 8px;
  background: linear-gradient(90deg, #0072B1, #00c4ff);
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* ------------------------- */
/* Step Indicator */
/* ------------------------- */
.step-indicator {
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

/* ------------------------- */
/* Popup Toast */
/* ------------------------- */
#form-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  padding: 16px 24px;
  font-weight: 500;
  font-size: 15px;
  border-radius: 10px;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 85%;
  text-align: center;
  background: white;
}

#form-message.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Input error highlight */
input.error, select.error {
  border-color: #f44336 !important;
}
