/* ─────────────────────────────────────────────────────────────
   bewerbung-form-additions.css
   Ergänzende Stile für: Captcha, Datenschutz-Checkbox,
   Validierungszustände, Erfolgs- und Fehlermeldungen
   ───────────────────────────────────────────────────────────── */

/* ── Validierungszustände ─────────────────────────────────── */
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #e53e3e !important;
  background-color: #fff5f5;
}

input.is-valid,
select.is-valid,
textarea.is-valid {
  border-color: #38a169 !important;
  background-color: #f0fff4;
}

.field-error {
  color: #e53e3e;
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 1.1em;
  display: block;
}

/* ── Globale Fehlermeldung ────────────────────────────────── */
.form-global-error {
  background: #fff5f5;
  border: 1px solid #e53e3e;
  border-left: 4px solid #e53e3e;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* ── CAPTCHA-Gruppe ───────────────────────────────────────── */
.captcha-group label strong {
  font-weight: 700;
  color: inherit;
}

/* ── Datenschutz-Checkbox ─────────────────────────────────── */
.checkbox-group {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  line-height: 1.5;
}

/* Natives Checkbox ausblenden */
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom Checkbox-Box */
.checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 2px;
}

/* Checked-State */
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #2b6cb0;
  border-color: #2b6cb0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* Focus-Ring für Accessibility */
.checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
}

/* Invalid-State der Checkbox */
.checkbox-label input[type="checkbox"].is-invalid + .checkbox-custom {
  border-color: #e53e3e;
  background: #fff5f5;
}

.checkbox-text {
  font-size: 0.875rem;
  color: #4a5568;
}

.checkbox-text a {
  color: #2b6cb0;
  text-decoration: underline;
}

/* ── Erfolgsmeldung ───────────────────────────────────────── */
.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  background: #38a169;
  color: #fff;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.form-success h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #1a202c;
}

.form-success p {
  color: #4a5568;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}
