.analytics-consent,
.analytics-feedback {
  position: fixed;
  z-index: 1000;
  color: #17352e;
  background: #fff;
  border: 1px solid #c8d8d1;
  box-shadow: 0 3px 16px #0001;
  font: 13px/1.5 system-ui, sans-serif;
}

.analytics-consent[hidden],
.analytics-settings[hidden] {
  display: none !important;
}

.analytics-consent {
  inset: 0;
  margin: auto;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-sizing: border-box;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 16px 48px #0003;
}

.analytics-consent::backdrop {
  background: #0e293766;
}

html:has(.analytics-consent[open]) {
  overflow: hidden;
}

.analytics-feedback {
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 0;
  padding: 14px 18px;
  border-radius: 12px;
}

.analytics-feedback:empty {
  display: none;
}

.analytics-consent h2 {
  margin: 0 0 8px;
  font: 700 20px/1.3 system-ui, sans-serif;
}

.analytics-consent h2:focus {
  outline: none;
}

.analytics-consent p {
  margin: 8px 0;
}

.analytics-consent a {
  color: #075e50;
  text-decoration: underline;
}

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

.analytics-actions button {
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #087b67;
  border-radius: 8px;
  color: #17352e;
  background: #fff;
  cursor: pointer;
  font: 600 13px/1.4 system-ui, sans-serif;
}

.analytics-actions button:focus-visible,
.analytics-settings:focus-visible,
.analytics-consent a:focus-visible {
  outline: 3px solid #087b67;
  outline-offset: 3px;
}

.analytics-actions button:hover {
  background: #eaf5f0;
}

.analytics-actions button:active {
  background: #d3eade;
  box-shadow: inset 0 2px 4px #0002;
}

.analytics-actions button[aria-pressed="true"] {
  color: #fff;
  background: #075e50;
  border-color: #075e50;
}

.analytics-settings {
  position: static;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-settings:hover,
.analytics-settings:active {
  color: var(--green, #087b67);
}

.footer-meta:has(.analytics-settings) {
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 0;
}

@media (forced-colors: active) {
  .analytics-actions button[aria-pressed="true"] {
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
    forced-color-adjust: none;
  }
}

#analytics-status:empty {
  display: none;
}

@media print {
  html:has(.analytics-consent[open]) {
    overflow: visible;
  }

  .analytics-consent,
  .analytics-settings,
  .analytics-feedback {
    display: none !important;
  }

  .analytics-consent::backdrop {
    display: none;
  }
}
