/* MSI Formulare – modernes, zugängliches Frontend ohne externe Dienste */

.msi-form-shell {
  width: min(100%, 980px);
  margin: clamp(32px, 5vw, 64px) 0;
  padding: clamp(24px, 4.5vw, 52px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: clamp(18px, 2vw, 28px);
  box-shadow: 0 24px 70px rgba(0, 34, 82, .10);
  color: var(--ink);
}

.content-block .msi-form-shell { max-width: none; }

.msi-form-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.msi-form-head .msi-form-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--msi-gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.msi-form-head .msi-form-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.msi-form-head h2 {
  margin: 0 0 14px;
  color: var(--msi-blue);
  font-size: clamp(1.85rem, 3.2vw, 2.8rem);
  line-height: 1.08;
}
.msi-form-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.65;
}

.msi-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px 20px;
}
.msi-form-field,
.msi-form-section,
.msi-form-notice { min-width: 0; grid-column: 1 / -1; }
.msi-form-field--half { grid-column: span 6; }
.msi-form-field--full { grid-column: 1 / -1; }

.msi-form-section {
  margin-top: 20px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.msi-form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.msi-form-section h3 {
  margin: 0 0 6px;
  color: var(--msi-blue);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}
.msi-form-section p { margin: 0; color: var(--ink-soft); }

.msi-form-notice {
  padding: 20px 22px;
  border: 1px solid rgba(201, 162, 39, .28);
  border-left: 4px solid var(--msi-gold);
  border-radius: 6px 14px 14px 6px;
  background: #fffaf0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.65;
}
.msi-form-notice > *:first-child { margin-top: 0; }
.msi-form-notice > *:last-child { margin-bottom: 0; }

.msi-form-field > label,
.msi-form-field legend {
  display: block;
  margin: 0 0 9px;
  padding: 0;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.45;
}
.msi-form-field fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.msi-form-required { color: var(--msi-red); }

.msi-form input[type="text"],
.msi-form input[type="email"],
.msi-form input[type="tel"],
.msi-form input[type="date"],
.msi-form input[type="number"],
.msi-form textarea,
.msi-form select {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #cfd6df;
  border-radius: 11px;
  outline: none;
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
  font-size: .96rem;
  line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.msi-form textarea { min-height: 130px; resize: vertical; }
.msi-form select { cursor: pointer; }
.msi-form select:disabled { cursor: not-allowed; opacity: .68; }
.msi-form input:focus,
.msi-form textarea:focus,
.msi-form select:focus {
  border-color: var(--msi-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 34, 82, .10);
}
.msi-form-field.has-error input,
.msi-form-field.has-error textarea,
.msi-form-field.has-error select {
  border-color: var(--msi-red);
}

.msi-form-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.msi-form-choices label,
.msi-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
}
.msi-form-choices label {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.msi-form input[type="radio"],
.msi-form input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--msi-blue);
}
.msi-form-checkbox a { color: var(--msi-blue); text-decoration: underline; text-underline-offset: 3px; }

.msi-form-help,
.msi-form-error {
  display: block;
  margin-top: 7px;
  font-size: .78rem;
  line-height: 1.45;
}
.msi-form-help { color: var(--ink-mute); }
.msi-form-error { color: var(--msi-red); font-weight: 600; }

.msi-form-security {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: end;
  margin-top: 6px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--cream);
}
.msi-form-security label { margin: 0; }
.msi-form-security label small { color: var(--ink-soft); font-size: .92rem; font-weight: 500; }

.msi-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.msi-form-footer-notes {
  max-width: 54ch;
}
.msi-form-footer p {
  margin: 0;
  color: var(--ink-mute);
  font-size: .78rem;
  line-height: 1.55;
}
.msi-form-footer p + p { margin-top: 6px; }
.msi-form-footer a { color: var(--msi-blue); text-decoration: underline; text-underline-offset: 2px; }
.msi-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--msi-blue);
  color: #fff;
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.msi-form-submit:hover { transform: translateY(-2px); background: var(--msi-blue-2); box-shadow: 0 10px 26px rgba(0, 34, 82, .20); }
.msi-form-submit:focus-visible { outline: 3px solid var(--msi-yellow); outline-offset: 3px; }
.msi-form-submit span { font-size: 1.15rem; }

.msi-form-message {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: .92rem;
  line-height: 1.55;
}
.msi-form-message strong { display: block; margin-bottom: 4px; }
.msi-form-message p:last-child,
.msi-form-message ul:last-child { margin-bottom: 0; }
.msi-form-message--success { border: 1px solid rgba(0, 145, 84, .25); background: #effaf5; color: #075d3c; }
.msi-form-message--error { border: 1px solid rgba(225, 12, 34, .24); background: #fff2f3; color: #9c1020; }
.msi-form-message--error ul { margin: 8px 0 0; padding-left: 20px; }

.msi-form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.msi-form-admin-hint {
  padding: 14px 16px;
  border-left: 4px solid var(--msi-gold);
  background: #fffaf0;
}

@media (max-width: 680px) {
  .msi-form-shell { margin: 26px 0; padding: 24px 18px; border-radius: 18px; }
  .msi-form-field--half { grid-column: 1 / -1; }
  .msi-form-grid { gap: 18px; }
  .msi-form-security { grid-template-columns: 1fr; }
  .msi-form-security input { max-width: 140px; }
  .msi-form-footer { align-items: stretch; flex-direction: column; }
  .msi-form-submit { width: 100%; }
  .msi-form-choices { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .msi-form-submit,
  .msi-form input,
  .msi-form textarea,
  .msi-form select { transition: none; }
}
