.sm-analytics-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  z-index: 2147483647;
  background: rgb(47 50 55 / 48%);
  pointer-events: none;
}

.sm-analytics-layer[hidden] {
  display: none;
}

.sm-analytics-choice {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: 424px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 48px);
  margin: 0;
  padding: 21px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e0e5eb;
  border-radius: 16px;
  background: #fff;
  color: #242f3b;
  box-shadow: 0 16px 48px #13223942;
  font: normal 15px / 1.5 system-ui, sans-serif;
  text-align: left;
  pointer-events: auto;
}

.sm-analytics-choice h2 {
  margin: 0 0 10px;
  color: inherit;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}

.sm-analytics-choice p {
  margin: 0 0 10px;
}

.sm-analytics-choice .sm-analytics-policy {
  color: #374c63;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.sm-analytics-actions button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #bcc6d1;
  border-radius: 10px;
  background: #f5f7fa;
  color: #273446;
  font: 650 14px / 1.25 system-ui, sans-serif;
  white-space: normal;
  cursor: pointer;
}

.sm-analytics-actions button:hover {
  border-color: #8395aa;
  background: #e7edf4;
}

.sm-analytics-choice :is(button, a):focus-visible {
  outline: 2px solid #285e99;
  outline-offset: 2px;
}

footer .sm-end-top .sm-end-brand,
footer .sm-footer-operator {
  margin: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

footer .sm-end-top .sm-end-brand {
  color: #a7b3c2;
}

footer .sm-footer-operator {
  opacity: .8;
}

footer.sm-end .sm-end-legal {
  flex-wrap: wrap;
  gap: 6px 16px;
}

footer .sm-analytics-settings {
  color: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 600px) {
  .sm-analytics-choice {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    max-height: calc(100% - 32px);
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
  }

  .sm-analytics-choice h2,
  .sm-analytics-choice p {
    margin-bottom: 6px;
  }

  .sm-analytics-actions {
    margin-top: 10px;
  }

  .sm-analytics-actions button {
    min-height: 44px;
    padding-inline: 5px;
    font-size: 13px;
  }
}
