/* ============================================================
 * Forms — Success-Card + Field-Error-States (Novella-Branding)
 * ------------------------------------------------------------
 * Wird auf Kontakt + Karriere-Detail eingebunden.
 * ============================================================ */

/* ============================================================
 * Success-Card (ersetzt das Form nach erfolgreichem Submit)
 * ============================================================ */
.form-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
  animation: form-success-in 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.form-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(157, 188, 118, 0.18);
  color: #5A7A3F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: form-success-icon-pop 540ms cubic-bezier(0.34, 1.56, 0.64, 1) 80ms backwards;
}

.form-success-title {
  font-size: 28px;
  font-weight: 700;
  color: #112D1D;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.form-success-text {
  font-size: 16px;
  line-height: 1.6;
  color: #4A5550;
  margin: 0 0 28px;
  max-width: 480px;
}

@keyframes form-success-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes form-success-icon-pop {
  0%   { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 599px) {
  .form-success-card {
    padding: 8px 0;
  }
  .form-success-title {
    font-size: 22px;
  }
  .form-success-text {
    font-size: 14px;
  }
}

/* ============================================================
 * Field-Error-States (für Validation-Errors)
 * ============================================================ */
.form-field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #C04A4A;
  line-height: 1.4;
}

.nv-input.has-error,
.nv-textarea.has-error,
.nv-select.has-error {
  border-color: #C04A4A !important;
  background-color: rgba(192, 74, 74, 0.04);
}

.nv-input.has-error:focus,
.nv-textarea.has-error:focus,
.nv-select.has-error:focus {
  border-color: #C04A4A !important;
  box-shadow: 0 0 0 3px rgba(192, 74, 74, 0.12);
}

/* Privacy-checkbox error (label-based) */
.form-privacy-error {
  margin-top: 8px;
  font-size: 13px;
  color: #C04A4A;
}

/* General error banner (top of form, e.g. Mail-Server down) */
.form-general-error {
  background: rgba(192, 74, 74, 0.06);
  border: 1px solid rgba(192, 74, 74, 0.24);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #8B2F2F;
  line-height: 1.5;
}

/* ============================================================
 * Custom File-Uploader (Bewerbungsformular)
 * ============================================================ */

/* Upload-Zone disabled, sobald Limit erreicht */
.application-form-file-label.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Liste hochgeladener Files unter der Upload-Zone */
.application-form-file-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.application-form-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(157, 188, 118, 0.08);
  border: 1px solid rgba(157, 188, 118, 0.28);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.application-form-file-item-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: #527766;
}

.application-form-file-item-name {
  flex: 1 1 auto;
  color: #112D1D;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.application-form-file-item-size {
  flex: 0 0 auto;
  color: #4A5550;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.application-form-file-item-remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #8B2F2F;
  cursor: pointer;
  transition: background-color 150ms;
}
.application-form-file-item-remove:hover,
.application-form-file-item-remove:focus-visible {
  background: rgba(192, 74, 74, 0.12);
}
.application-form-file-item-remove:focus-visible {
  outline: none;
}
