.privacy-link, .legal .privacy-link {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}
#cookie-dialog:not([open]), #cookie-dialog [hidden], .privacy-link[hidden] { display: none; }
#cookie-dialog {
  position: fixed;
  z-index: 10000;
  inset: auto auto max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  width: min(35rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  border: 1px solid #a4b0bf;
  border-radius: .85rem;
  padding: clamp(1rem, 2.4vw, 1.55rem);
  background: #fbfaf7;
  color: #203856;
  box-shadow: 0 .4rem 2rem #17263838;
  font: .95rem/1.48 "Inter", system-ui, sans-serif;
  text-align: left;
}
#cookie-dialog::backdrop { background: #182c454d; }
#cookie-dialog h2 { margin: 0 0 .45rem; font: 700 1.3rem/1.2 "Inter", system-ui, sans-serif; color: inherit; }
#cookie-dialog p { margin: .45rem 0; font: inherit; color: inherit; }
#cookie-dialog .cookie-info { font-size: .85rem; }
#cookie-dialog a { color: #254f91; text-decoration: underline; }
#cookie-details { margin-top: .8rem; padding-top: .45rem; border-top: 1px solid #c8cfd5; }
#cookie-details label { display: flex; align-items: flex-start; gap: .65rem; padding: .35rem 0; cursor: pointer; }
#cookie-details input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; flex-shrink: 0; accent-color: #305eaa; }
#cookie-details small { display: block; font-size: .85rem; }
#cookie-werbe-details { margin: .15rem 0 0 1.8rem; }
#cookie-werbe-details summary { padding: .5rem 0; min-height: 1.5rem; cursor: pointer; color: #254f91; font-size: .85rem; text-decoration: underline; text-underline-offset: .2em; }
.cookie-actions { margin-top: .9rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
#cookie-dialog .cookie-actions button { margin: 0; min-height: 44px; border: 1px solid #305eaa; border-radius: .4rem; padding: .45rem; background: #305eaa; color: white; font: 600 .9rem/1.25 "Inter", system-ui, sans-serif; cursor: pointer; }
#cookie-dialog .cookie-actions button:hover { background: #244c8c; }
#cookie-dialog [data-choice="settings"], #cookie-dialog [data-choice="save"] { grid-column: 1 / -1; background: transparent; color: #254f91; }
#cookie-dialog [data-choice="settings"]:hover, #cookie-dialog [data-choice="save"]:hover { background: #e9eff7; }
#cookie-dialog :focus-visible, .privacy-link:focus-visible { outline: 3px solid #a24220; outline-offset: 2px; }
@media (max-height: 430px) { #cookie-dialog { max-height: calc(100dvh - 1rem); bottom: .5rem; } }
/* Keep mobile actions clear of the hosting badge at the bottom of the viewport. */
@media (max-width: 600px) {
  #cookie-dialog:not(:modal) {
    bottom: max(4.75rem, env(safe-area-inset-bottom));
    max-height: calc(100dvh - 5.75rem);
  }
}
