/* ITsolveX NIS2-Check — Formularelemente & Ergebnis-Badges
   Erg&auml;nzt assets/style.css um native Select-/Radio-/Checkbox-Styles, die
   im Original nur f&uuml;r das Button-basierte Sicherheitscheck-Quiz existieren.
   Nutzt dieselben Design-Tokens aus :root in style.css (keine neuen Farben). */

/* ============================================
   Fieldsets als Frage-Gruppen
   ============================================ */
.nis2-form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}

.nis2-form-legend {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 10px;
  padding: 0;
}

/* ============================================
   Radio-Gruppen als Kachel-Auswahl
   ============================================ */
.nis2-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nis2-radio-option {
  position: relative;
  flex: 1 1 140px;
}

.nis2-radio-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.nis2-radio-option label {
  display: block;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.nis2-radio-option input[type="radio"]:hover + label {
  border-color: var(--color-accent);
}

.nis2-radio-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nis2-radio-option input[type="radio"]:checked + label {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  font-weight: 500;
}

/* ============================================
   Natives Select im Stil von .form-input
   ============================================ */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--color-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

optgroup {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
}

/* ============================================
   Fehler-Banner (Formularvalidierung)
   ============================================ */
.nis2-error-banner {
  background: var(--color-red-bg);
  border: 1px solid var(--color-red);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--color-red);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ============================================
   Anwendbarkeits-Badge (Stage-1-Ergebnisseite)
   css-Werte aus applicability_meta(): wesentlich / wichtig / nicht-betroffen
   ============================================ */
.applicability-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 5px 14px;
  border-radius: 99px;
}

.applicability-badge.wesentlich {
  background: var(--color-red-bg);
  color: var(--color-red);
}

.applicability-badge.wichtig {
  background: var(--color-amber-bg);
  color: var(--color-amber);
}

.applicability-badge.nicht-betroffen {
  background: var(--color-surface-2);
  color: var(--color-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
  .nis2-radio-option { flex: 1 1 100%; }
}
