/* Grundlayout */
:root {
  --panel-bg: #f3f4f6;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --green: #84cc16;
  --error: #b91c1c;
}

* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text); margin: 0; background: #ffffff; }

.sba-wrap { max-width: 100%; margin: 40px auto; padding: 0 16px; }
.sba-title { margin: 0 0 8px; font-size: 26px; }
.intro { color: var(--muted); margin: 0 0 16px; }

.sba-form { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }

.sba-fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.sba-fieldset > legend { font-weight: 600; margin-bottom: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 16px; background: #fff; }

.radio-group { display: inline-flex; gap: 14px; align-items: center; }
.radio-group label { font-size: 14px; color: var(--text); }

.hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }

.human-check { display: flex; flex-direction: column; gap: 8px; }
#hc-slider { width: 100%; }
.hc-status { font-size: 13px; color: var(--muted); }
.hc-status.pass { color: #0f766e; }

.checkbox { display: inline-flex; gap: 8px; align-items: flex-start; }
.privacy-text { margin-top: 10px; color: var(--muted); font-size: 14px; }
.privacy-text a { color: var(--primary); text-decoration: underline; }

.form-actions { display: flex; gap: 10px; align-items: center; }
.btn-primary { appearance: none; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--green); color: white; font-weight: 600; cursor: pointer; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.feedback { font-size: 14px; color: var(--muted); }
.feedback.error { color: var(--error); }
.feedback.success { color: #065f46; }

.uploads-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-group input[type="file"] {
  width: 100%;
}

.file-group .file-note {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #666;
}

/* deutsche Texte für file input sind Browser-Standard, wir zeigen Dateiname unterhalb */

.char-counter {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: var(--error);
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--error);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: var(--panel-bg);
}

.modal-body {
  padding: 20px 24px;
}

.modal-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.modal-footer .btn-primary {
  min-width: 80px;
}