/* Report form page styles */
.report-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;

}


.report-form {
  display: grid;
  /* minmax(0, 1fr) statt 1fr: Grid-Items haben sonst min-width:auto und
     können nicht unter ihre min-content-Breite schrumpfen. */
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;

}

.form-section,
.form-grid,
.form-row {
  min-width: 0;
}

.form-section {
  background: #ffffff;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 10px;
  padding: 16px 18px;
    border-radius: 20px;
    background-color: rgba(240, 240, 240, 0.7);
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
  color: #111827; /* gray-900 */
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 18px;
}

@media (min-width: 720px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}

.form-row input[type="text"],
.form-row input[type="url"],
.form-row textarea,
.form-section textarea,
.form-row select,
.form-section select {
  appearance: none;
  background-color: #fff;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #111827;
  /* Ohne diese Begrenzung wächst ein select auf die Breite seiner längsten
     Option (z.B. digital_literacy) und sprengt das Layout auf schmalen Screens. */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-row textarea {
  min-height: 110px;
}

.form-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb; /* blue-600 */
}

.helptext {
  font-size: 0.85rem;
  color: #6b7280; /* gray-500 */
}

.form-errors,
.field-errors {
  color: #b91c1c; /* red-700 */
  background: #fef2f2; /* red-50 */
  border: 1px solid #fecaca; /* red-200 */
  border-radius: 8px;
  padding: 8px 10px;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

/* File input tweaks */
.file-input-wrapper input[type="file"] {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
  /* File-Inputs haben eine intrinsische Default-Breite (hier 328px) und
     ragen sonst aus schmalen Containern heraus. */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Help icon + tooltip */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: #c2c2c2; /* gray-200 */
  position: relative;
  z-index: 1;
  cursor: help;
}
.help-icon::before {
  content: "?";
  display: block;
  font-weight: 700;
  font-size: 12px;
  color: #111827;
  line-height: 18px;
  text-align: center;
}
.help-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: normal;
  min-width: 220px;
  max-width: 420px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #111827; /* gray-900 */
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 2000;
  overflow: visible;
}
.help-icon:hover::after,
.help-icon:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* Ein mittig ausgerichteter Tooltip mit 220px Mindestbreite ragt neben einem
   Icon am rechten Rand aus dem Viewport. Auf schmalen Screens deshalb an der
   Viewport-Breite ausrichten statt am Icon. */
@media (max-width: 640px) {
  .help-icon::after {
    position: fixed;
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    min-width: 0;
    max-width: none;
    width: auto;
  }
}
