/* Apply Modal - Steps Quiz Form */
.apply-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease, display 0.35s ease;
  padding: 1.5rem;
}
.apply-modal-overlay.open {
  display: flex;
  opacity: 1;
}
.apply-modal {
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  background: var(--white, #ffffff);
  border-radius: var(--radius-lg, 20px);
  box-shadow: var(--shadow-lg, 0 24px 48px -12px rgb(0 0 0 / 0.18), 0 12px 24px -6px rgb(0 0 0 / 0.08));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: applySlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.4);
}
@keyframes applySlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.apply-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--bg-card, #f8fafc);
  color: var(--light-text, #64748b);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: var(--transition, all 0.3s ease);
}
.apply-modal-close:hover {
  background: var(--primary-orange, #F68835);
  color: var(--white, #ffffff);
  transform: rotate(90deg);
}
.apply-modal-header {
  padding: 1.75rem 1.75rem 0 1.75rem;
  position: relative;
  z-index: 2;
  text-align: center;
}
.apply-modal-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark-text, #0f172a);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.apply-modal-header p {
  color: var(--light-text, #64748b);
  font-size: 1rem;
  margin: 0;
}
.apply-modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--primary-orange, #F68835);
  border-radius: 2px;
  opacity: 0.6;
}
.apply-modal-body {
  padding: 1.25rem 1.75rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}
.apply-steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.apply-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color, #e2e8f0);
  background: var(--white, #ffffff);
  color: var(--light-text, #64748b);
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition, all 0.3s ease);
  flex-shrink: 0;
}
.apply-step.active {
  border-color: var(--primary-orange, #F68835);
  background: var(--primary-orange, #F68835);
  color: var(--white, #ffffff);
  box-shadow: 0 0 0 5px rgba(246, 136, 53, 0.2);
}
.apply-step.done {
  border-color: var(--primary-blue, #0D74BA);
  background: var(--primary-blue, #0D74BA);
  color: var(--white, #ffffff);
}
.apply-progress {
  height: 5px;
  background: var(--border-color, #e2e8f0);
  border-radius: 3px;
  margin-bottom: 1.75rem;
  overflow: hidden;
}
.apply-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-orange, #F68835);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.apply-step-panel {
  display: none;
  animation: applyFadeIn 0.35s ease;
}
.apply-step-panel.active {
  display: block;
}
@keyframes applyFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.apply-step-panel h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark-text, #0f172a);
  margin: 0 0 0.5rem;
}
.apply-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.apply-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-text, #0f172a);
}
.apply-field input,
.apply-field select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border-color, #e2e8f0);
  font-family: inherit;
  font-size: 0.975rem;
  color: var(--dark-text, #0f172a);
  background: var(--white, #ffffff);
  transition: var(--transition, all 0.3s ease);
}
.apply-field input:focus,
.apply-field select:focus {
  outline: none;
  border-color: var(--primary-blue, #0D74BA);
  box-shadow: 0 0 0 3px rgba(13, 116, 186, 0.15);
}
.apply-field input.error,
.apply-field select.error {
  border-color: var(--primary-orange-dark, #e5702e);
}
.apply-error {
  color: var(--primary-orange-dark, #e5702e);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}
.apply-field input.error ~ .apply-error,
.apply-field select.error ~ .apply-error {
  display: block;
}
.apply-field.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
}
.apply-field.consent-field input {
  width: auto;
  margin-top: 0.05rem;
}
.apply-field.consent-field label {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--dark-text, #0f172a);
}
.apply-nav.submit-nav {
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  justify-content: space-between;
}
.apply-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.apply-step-text {
  font-size: 0.85rem;
  color: var(--light-text, #64748b);
}
.apply-btn {
  border: none;
  border-radius: var(--radius, 12px);
  padding: 0.9rem 1.6rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.975rem;
  cursor: pointer;
  transition: var(--transition, all 0.3s ease);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.apply-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.apply-btn-next {
  background: var(--primary-blue, #0D74BA);
  color: var(--white, #ffffff);
}
.apply-btn-next:hover:not(:disabled) {
  background: var(--primary-blue-dark, #0a5a8f);
  transform: translateY(-2px);
}
.apply-btn-prev {
  background: transparent;
  color: var(--dark-text, #0f172a);
  border: 1px solid var(--border-color, #e2e8f0);
}
.apply-btn-prev:hover:not(:disabled) {
  border-color: var(--primary-orange, #F68835);
  color: var(--primary-orange, #F68835);
}
.apply-submit {
  background: var(--primary-orange, #F68835);
  color: var(--white, #ffffff);
  width: 100%;
  justify-content: center;
}
.apply-submit:hover:not(:disabled) {
  background: var(--primary-orange-dark, #e5702e);
  transform: translateY(-2px);
}
.apply-success {
  text-align: center;
  padding: 2rem 1.5rem;
  display: none;
}
.apply-success h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark-text, #0f172a);
  margin: 0 0 0.75rem;
}
.apply-success p {
  color: var(--light-text, #64748b);
  margin: 0 0 1.75rem;
}
.apply-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(56, 161, 105, 0.15);
  color: var(--success, #38A169);
  font-size: 1.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 0 8px rgba(56, 161, 105, 0.12);
}
.apply-modal-footer-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--light-text, #64748b);
}
.apply-modal--success .apply-modal-header,
.apply-modal--success .apply-steps,
.apply-modal--success .apply-progress,
.apply-modal--success .apply-nav,
.apply-modal--success .apply-modal-footer-note,
.apply-modal--success .apply-equal-housing {
  display: none !important;
}
.apply-modal--success .apply-modal-body {
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: visible;
}
.apply-modal--success .apply-success {
  display: block !important;
  text-align: center;
  padding: 0;
}
.apply-equal-housing {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  text-align: center;
}
.apply-equal-housing img {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
}
.apply-equal-housing span {
  font-size: 0.8rem;
  color: var(--light-text, #64748b);
  vertical-align: middle;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .apply-modal-overlay { padding: 1rem; }
  .apply-modal { max-height: 95vh; max-width: 100%; border-radius: 16px; }
  .apply-modal-header { padding: 1.5rem 1.25rem 0 1.25rem; }
  .apply-modal-body { padding: 1rem 1.25rem 1.5rem; }
  .apply-modal-header::after { left: 20%; right: 20%; }
}
