/* apply-modal.css · standalone overlay form, matches brand */

.apply-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9990;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #fff;
}
.apply-modal-root[hidden] { display: none; }

.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 0, 20, 0.88);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.apply-modal-root.is-open .apply-modal-backdrop { opacity: 1; }

.apply-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 16px)) scale(0.98);
  opacity: 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(20, 15, 40, 0.96), rgba(10, 5, 25, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 22px;
  padding: 2.4rem 2.4rem 2rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 80px rgba(108, 63, 255, 0.15);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.35s ease;
}
.apply-modal-root.is-open .apply-modal-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.apply-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.apply-modal-close:hover {
  color: #fff;
  border-color: rgba(212, 175, 55, 0.5);
  transform: rotate(90deg);
}

.apply-modal-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #D4AF37;
  font-weight: 800;
  margin-bottom: 1rem;
}

.apply-modal-h3 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 0.6rem;
}

.apply-modal-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 1.8rem;
}

.apply-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.apply-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.apply-modal-form label > span {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #D4AF37;
  font-weight: 700;
}

.apply-modal-form input,
.apply-modal-form select,
.apply-modal-form textarea {
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s, background 0.25s;
}

.apply-modal-form input:focus,
.apply-modal-form select:focus,
.apply-modal-form textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.04);
}

.apply-modal-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.apply-modal-submit {
  margin-top: 0.6rem;
  padding: 1rem 1.6rem;
  background: linear-gradient(135deg, #D4AF37 0%, #fff8d6 50%, #a78bfa 100%);
  color: #0a0518;
  border: none;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.apply-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(212, 175, 55, 0.3), 0 0 40px rgba(108, 63, 255, 0.2);
}
.apply-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.apply-modal-error {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 100, 100, 0.08);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 10px;
  font-size: 0.85rem;
  color: rgba(255, 200, 200, 0.95);
  line-height: 1.45;
}

/* Success view */
.apply-modal-success {
  text-align: center;
  padding: 1rem 0;
}
.apply-modal-success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37, #fff8d6 50%, #a78bfa);
  color: #0a0518;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(212, 175, 55, 0.3);
}
.apply-modal-success-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #D4AF37;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.apply-modal-success-sig {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0.4rem auto 1.6rem;
  background: linear-gradient(135deg, #D4AF37, #fff8d6 50%, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.apply-modal-success h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}
.apply-modal-success p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1.6rem;
  line-height: 1.6;
}
.apply-modal-success-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.apply-modal-success-close:hover {
  color: #D4AF37;
  border-color: rgba(212, 175, 55, 0.5);
}

@media (max-width: 600px) {
  .apply-modal-panel { padding: 2rem 1.4rem 1.6rem; max-width: calc(100vw - 1.6rem); }
  .apply-modal-h3 { font-size: 1.3rem; }
}

/* ── Mehrstufiges Formular ─────────────────────────────── */
.apply-fortschritt {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}
.apply-fortschritt-balken {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #a07810, #D4AF37 40%, #fff8d6 70%, #a78bfa);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.5);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.apply-kopf {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.apply-zaehler {
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #D4AF37;
}
.apply-zaehler i { font-style: normal; color: rgba(255,255,255,0.28); font-weight: 700; }

.apply-stufe { animation: applyStufeRein 0.32s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes applyStufeRein {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.apply-feldgruppe { display: flex; flex-direction: column; gap: 0.7rem; }
.apply-label {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.apply-modal-form label span i {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.3);
  margin-left: 0.4rem;
}

.apply-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.6rem;
}
.apply-kachel {
  padding: 0.85rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s;
}
.apply-kachel:hover {
  border-color: rgba(212, 175, 55, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.apply-kachel.ist-gewaehlt {
  border-color: rgba(212, 175, 55, 0.75);
  background: linear-gradient(135deg, rgba(212,175,55,0.16), rgba(108,63,255,0.14));
  color: #fff;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.16);
}

.apply-zusammenfassung {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
}

.apply-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.apply-navigation .apply-modal-submit { margin-top: 0; }
.apply-zurueck {
  background: none;
  border: none;
  padding: 0.6rem 0;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s;
}
.apply-zurueck:hover { color: #D4AF37; }
.apply-modal-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

@media (max-width: 520px) {
  .apply-kacheln { grid-template-columns: 1fr 1fr; }
  .apply-navigation { flex-direction: column-reverse; align-items: stretch; }
  .apply-navigation .apply-modal-submit { width: 100%; }
}
