/* Einwilligung für Matomo: gleiches Farbsystem wie das Portfolio. */
.th-consent[hidden] { display: none !important; }
.th-consent {
  box-sizing: border-box;
  position: fixed;
  z-index: 2147483000;
  inset-inline: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  max-height: calc(100vh - 40px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 40px - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  background: #30343a;
  border: 1px solid rgba(201, 179, 153, .6);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .37);
  color: #f8f7f3;
  font: 400 16px/1.5 'Abel', Arial, sans-serif;
  text-align: left;
}
.th-consent *, .th-consent *::before, .th-consent *::after { box-sizing: border-box; }
/* Den Text bei sehr wenig Bildschirmhöhe intern scrollen statt Buttons abzuschneiden. */
.th-consent__copy {
  flex: 1 1 480px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(226,199,168,.7) transparent;
}
.th-consent__eyebrow {
  color: #dcc4a7;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .16em;
  margin: 0 0 6px;
}
.th-consent__eyebrow span { color: #dcc4a7; margin-right: 4px; }
.th-consent h2 {
  color: #fff;
  text-align: left;
  font: 400 clamp(21px, 2.3vw, 27px)/1.17 'Passion One', Arial, sans-serif;
  margin: 0 0 7px;
  letter-spacing: .01em;
}
.th-consent p {
  color: #e2e1dd;
  font: 400 15px/1.5 'Abel', Arial, sans-serif;
  text-align: left;
  margin: 0;
  max-width: 650px;
}
.th-consent a { color: #f0d6b8; text-decoration: underline; text-underline-offset: 3px; }
.th-consent a:hover { color: #fff; }
/* Beide Entscheidungen bleiben selbst im Querformat jederzeit erreichbar. */
.th-consent__actions {
  display: flex;
  gap: 9px;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
}
.th-consent .th-consent__btn {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 45px;
  padding: 10px 17px;
  border: 1px solid #e2c7a8;
  border-radius: 7px;
  font: 700 15px/1.3 'Abel', Arial, sans-serif;
  letter-spacing: .01em;
  white-space: nowrap;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.th-consent .th-consent__btn--deny { color: #fff; background: transparent; }
.th-consent .th-consent__btn--allow { color: #25282d; background: #e2c7a8; }
.th-consent .th-consent__btn--deny:hover,
.th-consent .th-consent__btn--deny:focus-visible { background: #44484d; }
.th-consent .th-consent__btn--allow:hover,
.th-consent .th-consent__btn--allow:focus-visible { background: #f0d9bf; }
.th-consent :focus-visible,
.th-privacy-link:focus-visible { outline: 3px solid #d4a16a !important; outline-offset: 4px; }
button.th-privacy-link {
  appearance: none;
  display: inline;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: .16em;
  cursor: pointer;
}
button.th-privacy-link:hover { color: #a18c75; background: transparent; }
.th-privacy-inline { padding: 24px; text-align: center; font-size: 15px; }
.th-privacy-inline a { color: inherit; text-decoration: underline; }
@media (max-width: 920px) {
  .th-consent { flex-direction: column; align-items: stretch; gap: 16px; }
  .th-consent__copy { flex: 0 1 auto; }
  .th-consent__actions { align-self: stretch; justify-content: stretch; }
  .th-consent__actions button { flex: 1; }
}
@media (max-width: 480px) {
  .th-consent {
    width: calc(100% - 24px);
    inset-inline: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-height: calc(100vh - 24px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    padding: 17px 16px;
    border-radius: 12px;
  }
  .th-consent p { font-size: 14px; }
  .th-consent__actions { flex-direction: column; align-items: stretch; }
  .th-consent .th-consent__btn { width: 100%; min-height: 44px; }
}
/* Kleine Smartphone-Querformate und starke Textvergrößerung. */
@media (max-height: 450px) {
  .th-consent { gap: 10px; padding-block: 12px; }
  .th-consent__eyebrow { font-size: 11px; }
  .th-consent h2 { font-size: 20px; }
  .th-consent p { font-size: 14px; line-height: 1.4; }
  .th-consent__actions { gap: 7px; }
  .th-consent .th-consent__btn { min-height: 44px; padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { .th-consent__btn { transition: none !important; } }

/* V48: Zentrierung ohne translate/transform. Funktioniert auch bei altem CSS. */
.th-consent:not([hidden]) {
  position: fixed !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  inset-inline-start: 0 !important;
  inset-inline-end: 0 !important;
  transform: none !important;
  translate: none !important;
  width: calc(100vw - 24px) !important;
  max-width: 720px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100vh - 24px - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)) !important;
  padding: clamp(14px, 3vw, 24px) !important;
  gap: 12px !important;
  overflow: hidden !important;
}
.th-consent:not([hidden]) .th-consent__copy {
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overflow-wrap: anywhere !important;
}
.th-consent:not([hidden]) .th-consent__copy h2,
.th-consent:not([hidden]) .th-consent__copy p {
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
.th-consent:not([hidden]) .th-consent__actions {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
}
.th-consent:not([hidden]) .th-consent__actions .th-consent__btn {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
}
@media (max-width: 520px) {
  .th-consent:not([hidden]) .th-consent__actions {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }
}
@media (max-height: 450px) {
  .th-consent:not([hidden]) {gap: 8px !important; padding-block: 10px !important;}
  .th-consent:not([hidden]) .th-consent__actions {gap: 6px !important;}
  .th-consent:not([hidden]) .th-consent__btn {min-height: 42px !important; padding-block: 8px !important;}
}
