/* ===== APPLY MODAL STYLES ===== */

:root {
  --primary: #1B365D;
  --accent: #2C5282;
  --gold-light: #C9A96E;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --light-bg: #f8fafc;
  --border: #e2e8f0;
  --shadow-soft: 0 4px 20px rgba(27,54,93,0.08);
  --shadow-medium: 0 8px 32px rgba(27,54,93,0.12);
  --radius: 12px;
}

/* Modal */
.apply-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.apply-modal.is-open {
  display: block;
}

.apply-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.apply-modal__wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.apply-modal__dialog {
  position: relative;
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow: auto;
  margin: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  padding: 26px 26px 22px;
}

.apply-modal__dialog h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.apply-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
}

/* Form */
.apply-modal .apply-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.apply-modal .apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .apply-modal .apply-grid {
    grid-template-columns: 1fr;
  }
}

.apply-modal .apply-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1B365D;
  margin: 0 0 14px;
}

.apply-modal .apply-form input[type="text"],
.apply-modal .apply-form input[type="email"],
.apply-modal .apply-form input[type="tel"],
.apply-modal .apply-form input[type="file"],
.apply-modal .apply-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(27,54,93,0.18);
  background: #fff;
  font-size: 14px;
  line-height: 1.2;
  transition: border-color 0.2s;
}

.apply-modal .apply-form input[type="text"]:focus,
.apply-modal .apply-form input[type="email"]:focus,
.apply-modal .apply-form input[type="tel"]:focus,
.apply-modal .apply-form input[type="file"]:focus,
.apply-modal .apply-form textarea:focus {
  outline: none;
  border-color: var(--gold-light);
}

.apply-modal .apply-form input[type="file"] {
  padding: 10px 12px;
}

.apply-modal .apply-form textarea {
  resize: vertical;
  min-height: 140px;
}

.apply-modal .apply-form small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(27,54,93,0.65);
  font-weight: 500;
}

.apply-modal .apply-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 18px;
  font-weight: 600;
  color: rgba(27,54,93,0.95);
}

.apply-modal .apply-consent input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Submit Button */
#applySubmit.btn-primary {
  width: 100%;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 12px;
}

/* Progress */
.apply-progress {
  position: relative;
  height: 24px;
  background: var(--light-bg);
  border-radius: 12px;
  overflow: hidden;
}

.apply-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.apply-progress__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Alerts */
.apply-alert {
  padding: 15px;
  border-radius: 6px;
  font-weight: 500;
}

.apply-alert--error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.apply-alert--success {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Responsive */
@media (max-width: 600px) {
  .apply-modal__dialog {
    padding: 20px;
  }

  .apply-grid {
    grid-template-columns: 1fr;
  }

  .apply-form {
    gap: 15px;
  }
}
/* Fix: Vorname/Nachname dürfen niemals "mini" sein */
.apply-modal .apply-grid label {
  width: 100%;
}
.apply-modal .apply-grid label input {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

/* Einheitliche Feldhöhe / Optik */
.apply-modal .apply-form input[type="text"],
.apply-modal .apply-form input[type="email"],
.apply-modal .apply-form input[type="tel"] {
  height: 44px;
}

/* Optional: Fokus schöner */
.apply-modal .apply-form input:focus,
.apply-modal .apply-form textarea:focus {
  outline: none;
  border-color: rgba(27, 54, 93, 0.35);
  box-shadow: 0 0 0 4px rgba(27, 54, 93, 0.08);
}