.analytics-options {
  margin: 8px 16px 16px;
  text-align: center;
}

#analytics-settings {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--on-variant);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#analytics-choice {
  position: fixed;
  z-index: 58;
  inset: auto 0 calc(var(--v2-nav-height, 80px) + env(safe-area-inset-bottom) + 8px);
  box-sizing: border-box;
  width: min(400px, calc(100% - 32px));
  max-height: calc(100dvh - var(--v2-nav-height, 80px) - env(safe-area-inset-bottom) - 16px);
  margin-inline: auto;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--outline-soft);
  border-radius: 16px;
  background: var(--paper);
  color: var(--primary);
  box-shadow: var(--sh-hover);
}

#analytics-choice p {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}

#analytics-choice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.analytics-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.analytics-actions button {
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.analytics-actions button:hover {
  background: var(--surface-cont-hi);
}

#analytics-choice :focus-visible,
#analytics-settings:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  #analytics-choice {
    right: max(24px, calc((100% - var(--v2-canvas, 960px)) / 2 + 24px));
    bottom: 24px;
    left: auto;
    max-height: calc(100dvh - 48px);
    padding: 16px;
  }
}
