.tr-analytics-consent[hidden] { display: none; }
.tr-analytics-consent {
  color-scheme: light dark;
  position: fixed;
  z-index: 50;
  inset-inline-start: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  max-width: min(33rem, calc(100% - 2rem));
  padding: 1rem 1.125rem;
  border: 1px solid color-mix(in srgb, currentcolor 15%, transparent);
  border-radius: 1rem;
  background: light-dark(#f7f6f3, #1b1b1b);
  color: light-dark(#272727, #d3d3d3);
  box-shadow: 0 8px 28px #0002;
  font: 0.81rem/1.6 system-ui, sans-serif;
}
html:has(body.study-edition) .tr-analytics-consent { color-scheme: light; }
html[data-theme="all-black"] .tr-analytics-consent { color-scheme: dark; }
.tr-analytics-consent p { margin: 0.25rem 0 0; }
.tr-analytics-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tr-analytics-actions button {
  min-height: 2.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, currentcolor 28%, transparent);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}
.tr-analytics-actions button:hover { background: color-mix(in srgb, currentcolor 8%, transparent); }
.tr-analytics-preferences {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tr-analytics-preferences:hover { text-decoration: underline; }
.tr-analytics-details-open {
  display: inline-block; margin-inline-start: .6rem; padding: .25rem;
  border: 0; background: transparent; color: inherit; font: inherit;
  text-decoration: underline; cursor: pointer;
}
.tr-analytics-details {
  color-scheme: light dark; box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  margin: auto; padding: 1.25rem; overflow: auto;
  border: 1px solid color-mix(in srgb, currentcolor 25%, transparent); border-radius: .75rem;
  background: light-dark(#fff, #1b1b1b); color: light-dark(#272727, #e8e8e8);
  font: .9rem/1.7 system-ui, sans-serif;
}
html:has(body.study-edition) .tr-analytics-details { color-scheme: light; }
html[data-theme="all-black"] .tr-analytics-details { color-scheme: dark; }
.tr-analytics-details::backdrop { background: #0008; }
.tr-analytics-details h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.tr-analytics-details p { margin: .75rem 0; }
.tr-analytics-details dt { font-weight: 700; margin-top: .75rem; }
.tr-analytics-details dd { margin: .2rem 0 0; }
.tr-analytics-details a { color: inherit; text-decoration: underline; }
.tr-analytics-details form { margin-top: 1rem; text-align: right; }
.tr-analytics-details button { padding: .5rem 1rem; border: 1px solid currentcolor; border-radius: .5rem; background: transparent; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 580px) {
  .tr-analytics-consent { grid-template-columns: 1fr; gap: 0.65rem; }
  .tr-analytics-actions { justify-content: end; }
}
