.analytics-consent {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 10020;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
  padding: 18px;
  color: #eef8fb;
  background: color-mix(in srgb, #101923 94%, transparent);
  border: 1px solid rgba(98, 211, 231, 0.34);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.analytics-consent[hidden],
.analytics-consent-settings[hidden] { display: none !important; }

html[data-analytics-consent="granted"] .analytics-consent,
html[data-analytics-consent="denied"] .analytics-consent,
html[data-analytics-consent="unset"] .analytics-consent-settings { display: none !important; }

.analytics-consent__copy { min-width: 0; }
.analytics-consent__title { margin: 0 0 6px; color: #fff; font-size: 15px; font-weight: 800; }
.analytics-consent__body { margin: 0; color: #c2d1d8; font-size: 12px; line-height: 1.55; }
.analytics-consent__body a { color: #66d9ef; text-decoration: underline; text-underline-offset: 3px; }
.analytics-consent__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.analytics-consent__button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #e8f5f8;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.analytics-consent__button--accept {
  color: #06161b;
  border-color: #67def0;
  background: linear-gradient(135deg, #67def0, #8ce3c5);
}
.analytics-consent__button:focus-visible,
.analytics-consent-settings:focus-visible { outline: 3px solid rgba(103, 222, 240, 0.5); outline-offset: 3px; }

.analytics-consent-settings {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 10010;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(98, 211, 231, 0.28);
  border-radius: 999px;
  color: #d9edf2;
  background: rgba(14, 24, 33, 0.88);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

html.light-mode .analytics-consent {
  color: #15232b;
  background: rgba(249, 252, 252, 0.96);
  border-color: rgba(0, 126, 150, 0.28);
  box-shadow: 0 20px 60px rgba(24, 45, 54, 0.18);
}
html.light-mode .analytics-consent__title { color: #0f1d24; }
html.light-mode .analytics-consent__body { color: #40545d; }
html.light-mode .analytics-consent__button { color: #16313b; border-color: rgba(23, 70, 82, 0.2); background: #eef5f6; }
html.light-mode .analytics-consent__button--accept { color: #06161b; border-color: #36bdd4; background: linear-gradient(135deg, #62d9ed, #8ce3c5); }
html.light-mode .analytics-consent-settings { color: #16313b; background: rgba(249, 252, 252, 0.94); }

@media (max-width: 680px) {
  .analytics-consent { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .analytics-consent__actions { justify-content: stretch; }
  .analytics-consent__button { flex: 1 1 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent, .analytics-consent-settings { scroll-behavior: auto; }
}
