/* Consent-Banner und -Dialog (consent.js). Gleiche Regeln wie in main.css,
   für Seiten ohne main.css (Landingpage Maschinenverordnung). Die Seite lädt
   zusätzlich fonts.css (Roboto, Raleway, Poppins).

   Der erste Block setzt die Grundwerte, die auf den übrigen Seiten aus Bootstrap
   und main.css kommen, damit Banner und Dialog dort und hier gleich aussehen. */

.consent-banner,
.consent-dialog {
  --fs-h4: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: #000000;
}

@media (max-width: 768px) {
  .consent-banner,
  .consent-dialog {
    --fs-h4: 1.0625rem;
  }
}

.consent-banner h2,
.consent-dialog h2 {
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  line-height: 1.2;
}

.consent-dialog-body > p {
  margin: 0 0 1rem;
}

.consent-category label {
  font-size: 1rem;
}

/* Schließen-Symbol: auf den übrigen Seiten das Bootstrap-Icon bi-x-lg */
.consent-close .bi-x-lg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000035'%3E%3Cpath d='M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  color: rgba(0, 0, 0, 0.8);
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 53, 0.12);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 53, 0.12);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.consent-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.consent-banner h2 {
  margin: 0 0 2px;
  color: #000035;
  font-size: var(--fs-small);
}

.consent-dialog h2 {
  margin: 0 0 6px;
  color: #000035;
  font-size: var(--fs-h4);
}

.consent-banner p {
  margin: 0;
}

.consent-banner a,
.consent-dialog a {
  color: #000035;
  text-decoration: underline;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consent-banner .consent-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.consent-banner .consent-btn {
  min-height: 36px;
  padding: 4px 14px;
  border-width: 1px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.consent-btn {
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid #000035;
  border-radius: 4px;
  color: #ffffff;
  background-color: #000035;
  font-family: var(--nav-font, "Poppins", sans-serif);
  font-size: var(--fs-small);
  font-weight: 500;
  transition: 0.3s;
}

.consent-btn:hover {
  border-color: var(--accent-color, #e83882);
  background-color: var(--accent-color, #e83882);
}

.consent-btn-outline {
  color: #000035;
  background-color: transparent;
}

.consent-btn-outline:hover {
  color: #ffffff;
}

.consent-btn:focus-visible,
.consent-close:focus-visible,
.consent-banner a:focus-visible,
.consent-dialog a:focus-visible,
.consent-category input:focus-visible,
.footer .consent-settings-link:focus-visible {
  outline: 3px solid var(--accent-color, #e83882);
  outline-offset: 2px;
}

.consent-dialog {
  width: calc(100% - 32px);
  max-width: 600px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #000000;
  background-color: #ffffff;
  box-shadow: 0 8px 32px rgba(0, 0, 53, 0.3);
  font-size: var(--fs-small);
}

.consent-dialog::backdrop {
  background-color: rgba(0, 0, 53, 0.5);
}

.consent-dialog-body {
  padding: 24px;
}

.consent-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.consent-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #000035;
  font-size: 1.125rem;
}

.consent-category {
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 53, 0.12);
}

.consent-category-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consent-category input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #000035;
}

.consent-category label {
  color: #000035;
  font-weight: 600;
  font-size: var(--fs-body);
}

.consent-always {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.6);
  font-size: var(--fs-xs);
}

.consent-category p {
  margin: 6px 0 0 30px;
}

.consent-dialog .consent-actions {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 53, 0.12);
}

.consent-dialog .consent-btn {
  flex: 1 1 160px;
}

@media (max-width: 768px) {
  .consent-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: calc(100% - 16px);
    overflow-y: auto;
    padding: 12px;
  }

  .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .consent-banner .consent-actions {
    flex-wrap: wrap;
  }

  .consent-banner .consent-btn {
    flex: 1 1 100px;
    min-height: 40px;
  }

  .consent-dialog-body {
    padding: 20px 16px;
  }
}
