﻿/* ========== Grundlayout ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Links */
a,
.btn-link {
  color: #006bb7;
}
/* Alle h1- und p-Texte schwarz */
h,
p {
  color: #000;
}

/* ==== NavMenu Styles (ähnlich Studio-Cube) ==== */
.navmenu-container {
  text-align: center;
}

.navmenu-logo {
  max-width: 300px;
  height: auto;
}

/* Schwarze Linie unter dem Logo, etwas breiter als die Links */
.navmenu-line {
  width: 60%; /* z.B. 60% */
  margin: 0 auto 2rem auto; /* zentriert, 2rem Abstand nach unten */
  border-bottom: 2px solid #000;
}

/* UL-Liste für die Menüpunkte (falls du horizontale Links möchtest) */
.navmenu-list {
  list-style: none;
  display: inline-flex; /* horizontale Anordnung */
  gap: 2rem; /* Abstand zwischen Links */
  margin: 0 auto;
  padding: 0;
}

/* Menüpunkte (NavLinks) in schwarz, beim Hover grau */
.navmenu-list li a {
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase; /* optional, wie bei Studio Cube */
  font-weight: 400; /* leichter Font */
}

.navmenu-list li a:hover {
  color: #666;
}

/* ========== Navbar Fix ========== */
.navbar {
  width: 100%;
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
/* ========== Welcome Container ========== */
/* Willkommensseite */

.welcome-container {
  width: 60vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0px 40px 10px rgba(0, 0, 0, 0.1);
  margin-top: 7rem;
}

.welcome-container h1 {
  font-size: 1.7rem;
  font-weight: 500;
  white-space: normal;
}
.welcome-container h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
  white-space: normal;
  line-height: 1.5;
}

.start-button {
  background-color: black;
  color: white;
  font-weight: 600;
  font-size: 26px;
  border: none;
  padding: 10px 25px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  letter-spacing: 1px;
}

.start-button:hover {
  background-color: #333;
}

.button-hint-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Formular Styling ========== */

/* Container für das Formular mit "Kontaktdaten" */
.container-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 60px;
  margin-top: 3rem;
}

.form-container {
  align-items: center;
  padding: 3rem;
  box-shadow: 0 0px 40px 10px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  width: 50vw;
}

/* Formular-Inhalt */
.form-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Titel innerhalb des Formularcontainers */
.form-title {
  font-size: 1.8rem;
  font-weight: 400;
  color: #000;
}

.form-title-text-muted {
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

/* Mehr Abstand zwischen den Formularfeldern */
.form-group {
  margin-bottom: 1rem; /* Mehr Abstand zwischen Vorname, Nachname, etc. */
}
/* Mehr Abstand zwischen den Formularfeldern */
.form-group {
  margin-bottom: 1rem; /* Mehr Abstand zwischen Vorname, Nachname, etc. */
}

.form-group-building_usage {
  align-items: center;
  justify-content: center;
  display: flex;
  gap: 0.5rem;
}
.form-group-building_type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-business-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-publicBuilding-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-waterdamage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-groundwater-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-elementaldamagetype {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}

.form-group-groundwater-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-groundwater-location button:nth-of-type(5) {
  justify-self: center;
  grid-column: 1/3;
}
.form-group-groundwater-entrytime {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.5rem;
}
.form-group-groundwater-entrytime button:nth-of-type(5) {
  justify-self: center;
  grid-column: 1/3;
}

/* Labels (Vorname, Nachname, etc.) */
.form-group label {
  display: block;
  font-weight: 400;
  font-size: 1.5rem;
  color: #000 !important; /* Erzwungene schwarze Farbe */
  margin-bottom: 10px;
}

/* Ausnahme für den custom-file-upload-Button */
.form-group label.custom-file-upload {
  color: white !important; /* Weiß für den Datei-Upload-Button */
}

/* Input-Felder */
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1.3rem;
  font-weight: 500;
  align-items: center;
  justify-content: center;
}

/* Schriftgröße der Platzhaltertexte */
.form-control::placeholder {
  font-size: 1.3rem; /* gleicher Wert wie oben oder größer/kleiner */
  color: #999; /* falls du auch die Farbe anpassen möchtest */
}

.input-text {
  color: black;
}

.list-group {
  max-width: 450px; /* Passe die Breite nach Bedarf an */
}

/* Falls text-muted noch zu dunkel ist */
.text-muted {
  color: #999 !important; /* Helleres Grau */
}

.fixed-width-btn {
  width: 14rem; /* Wähle eine Breite, die allen Text beherbergt */
}

.damage-type-buttons {
  justify-items: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* OK-Button */
.btn-submit {
  padding: 10px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  background-color: black;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Button-Container für Zurück- und Ok-Button */
.button-container {
  display: flex;
  justify-content: space-between;
  width: 50vw;
  margin-bottom: 1rem;
}
.button-container-first-details {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
  width: 50vw;
}

/* Styling für den Zurück-Button (links) */
.btn-left {
  order: -1; /* Stellt sicher, dass der Button links steht */
}

/* Styling für den Ok/Weiter-Button (rechts) */
.btn-right {
  order: 1; /* Stellt sicher, dass der Button rechts steht */
}

/* Spezieller Container für den Bilder-Upload-Button */
.button-container-upload {
  display: flex;
  justify-content: flex-start;
  margin: 1rem 0; /* Angepasste Margin ohne extreme Werte */
}

.btn-submit:hover {
  background-color: #333;
}

.dynamic-text-color {
  color: black !important; /* Standardfarbe Schwarz */
}

.dynamic-text-color::placeholder {
  color: #6c757d !important; /* Grauer Placeholder bleibt */
}

/* ========== Upload-Button ========== */
.upload-status {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1.1rem;
  white-space: normal;
  word-break: break-word;
}

.upload-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.upload-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Abrundung nur links für den "Bilder auswählen"-Button */
.btn.rounded-left-only {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Abrundung nur rechts für den "Bilder hochladen"-Button */
.btn.rounded-right-only {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Benutzerdefinierter Datei-Upload-Button mit höherer Spezifität */
.form-group label.custom-file-upload {
  display: inline-flex; /* Änderung von inline-block zu inline-flex für bessere Ausrichtung */
  align-items: center; /* Vertikale Zentrierung von Icon und Text */
  padding: 10px 25px; /* Identisch mit btn-submit */
  font-size: 1.2rem; /* Identisch mit btn-submit */
  font-weight: bold; /* Identisch mit btn-submit */
  background-color: black; /* Identisch mit btn-submit */
  color: white; /* Weiß ohne !important, da die Spezifität jetzt höher ist */
  border: none; /* Identisch mit btn-submit */
  border-radius: 5px; /* Identisch mit btn-submit */
  cursor: pointer;
  transition: background-color 0.3s ease; /* Identisch mit btn-submit */
  text-align: center;
  width: auto; /* Passt sich dem Inhalt an, aber nicht über max-width hinaus */
  white-space: nowrap; /* Verhindert Zeilenumbruch */
}

.form-group label.custom-file-upload:hover {
  background-color: #333; /* Identisch mit btn-submit */
}

/* Abstand zwischen Icon und Text im Button */
.form-group label.custom-file-upload i {
  margin-right: 8px; /* Abstand zwischen Icon und Text */
}

/* Verstecke den Standard-InputFile-Button */
input[type='file'] {
  display: none;
}

/* Liste der hochgeladenen Dateien */
.uploaded-files {
  margin-top: 1rem;
}

.uploaded-files h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.uploaded-files ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.uploaded-files li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
  gap: 0.5rem;
}

/* Dateiname: wird bei Überlänge mit "..." gekürzt */
.uploaded-files li span.file-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styling für den Close-Button als rotes X */
.uploaded-files button.btn-close {
  flex: 0 0 auto; /* fixierte Breite rechts */
  padding: 0;
  line-height: 1;
  opacity: 1;
  margin-left: 0.5rem;

  filter: brightness(0) saturate(100%) invert(28%) sepia(74%) saturate(2476%)
    hue-rotate(346deg) brightness(91%) contrast(101%);
}

.uploaded-files button.btn-close:hover {
  filter: brightness(0) saturate(100%) invert(23%) sepia(68%) saturate(2174%)
    hue-rotate(346deg) brightness(85%) contrast(101%);
  opacity: 1;
}

/* --- InputGroup: Status rechts sauber abschneiden --- */
.input-group .form-control.file-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden; /* wichtig für .text-truncate */
  white-space: nowrap; /* kein Umbruch */
}

.input-group .file-status .text-truncate {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Einheitliche Reihe für Dateiliste (alle Uploads) --- */
.uploaded-files li.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}

.uploaded-files li.file-row .file-name {
  flex: 1 1 auto;
  min-width: 0; /* erlaubt ellipsis im Flex-Child */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Button rechts fix, kein float */
.uploaded-files li.file-row .btn-close {
  flex: 0 0 auto;
  margin-left: 0.5rem;
}

/* Close-Button aufräumen & Spinner sauber zentrieren */
.uploaded-files li .btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Wenn Spinner gezeigt wird: Standard-X von Bootstrap ausblenden */
.btn-close.btn-close--empty {
  background-image: none !important;
  opacity: 1; /* bleibt klar sichtbar */
}

/* ========== Final Container ========== */
/* Finalseite */
.final-container {
  margin-top: 10rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0px 40px 10px rgba(0, 0, 0, 0.1);
}

.final-container h1 {
  font-size: 1.7rem;
  font-weight: 500;
  white-space: normal;
  line-height: 1.5;
}

/* =========================================
   Validation
========================================= */
.valid.modified:not([type='checkbox']) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

/* Extra: custom validation style with "⚠" */
.my-validation-message {
  display: inline-block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 500;
  margin-top: 5px;
}

/* Icon mit before-Selector */
.my-validation-message::before {
  content: '!'; /* Das Zeichen, das du anzeigen willst */
  margin-right: 0.5rem; /* Abstand zum eigentlichen Text */
  color: #fff; /* weißer Text auf rotem Hintergrund */
  background-color: #d9534f; /* passender Rotton */
  border-radius: 50%; /* runder Kreis */
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.highlight-error {
  animation: blink 1s ease-in-out 2;
}

@keyframes blink {
  0% {
    border-color: #e50000;
  }

  50% {
    border-color: transparent;
  }

  100% {
    border-color: #e50000;
  }
}

/*ReportViewer*/

/* ============ Allgemein ============ */

.report-page {
  width: 960px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  font-family: 'Segoe UI', sans-serif;
  color: #222;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  position: relative;
  box-sizing: border-box;
}

/* ============ Struktur ============ */

.report-header,
.report-body,
.report-footer {
  width: 100%;
  box-sizing: border-box;
}

/* Header */

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0078d4;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.header-left h1 {
  font-size: 24px;
  margin: 0;
  color: #0078d4;
}

.header-left p {
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.header-right img {
  height: 60px;
}

/* Body */

.report-body {
  margin-bottom: 2rem;
}

.report-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.report-details {
  font-size: 14px;
}

.label {
  font-weight: bold;
  display: inline-block;
  width: 150px;
}

.value {
  display: inline-block;
}

.report-section p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* Footer */

.report-footer {
  border-top: 1px solid #ccc;
  padding-top: 0.75rem;
  text-align: right;
  font-size: 12px;
  color: #888;
  margin-top: 2rem;
}

.page-break {
  page-break-before: always;
}

.report-page {
  padding: 2rem;
  background: white;
}

/* z.B. in site.css */
.start-button[disabled] {
  opacity: 0.85;
  cursor: progress;
}

/* rotierender ReportCube-Würfel */
.spinner-cube {
  width: var(--cube-size, 24px);
  height: var(--cube-size, 24px);
  display: inline-block;

  /* Statt background-image: SVG als Maske verwenden */
  -webkit-mask: url('/img/cube.svg') no-repeat center;
  mask: url('/img/cube.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;

  /* Diese Farbe bestimmt die sichtbare Würfelfarbe */
  background-color: var(--spinner-color, currentColor);

  animation: rc-spin 0.9s linear infinite;
}

@keyframes rc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* optional: halbtransparente Overlay-Variante */
.busy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  z-index: 2000;
}
.busy-box {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

/* ============ Medien für Druck ============ */

@media print {
  .report-page {
    width: 210mm;
    height: 297mm;
    padding: 20mm;
    box-shadow: none;
    page-break-after: always;
    overflow: hidden;
  }

  .screen-only {
    display: none;
  }

  .print-only {
    display: block;
  }
}

@media screen {
  .print-only {
    display: none;
  }
}
