.uled-analytics-consent {
  position: fixed;
  z-index: 1100;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  max-width: 30rem;
  max-height: calc(100vh - 1.5rem);
  max-height: calc(
    100dvh - max(0.75rem, env(safe-area-inset-top, 0px))
    - max(0.75rem, env(safe-area-inset-bottom, 0px))
  );
  overflow: auto;
  box-sizing: border-box;
  margin-left: auto;
  padding: 1.25rem;
  border: 1px solid #dce6f3;
  border-radius: 1rem;
  background: #fff;
  color: #162638;
  box-shadow: 0 0.5rem 2rem rgb(16 24 40 / 18%);
  font-size: 0.8375rem;
  line-height: 1.5;
}

.uled-analytics-consent[hidden] {
  display: none;
}

.uled-analytics-consent h2 {
  margin: 0 0 0.25rem;
  color: inherit;
  font-size: 1.0rem;
}

.uled-analytics-consent p {
  margin: 0;
}

.uled-analytics-consent__policy {
  display: inline-block;
  margin-top: 0.25rem;
  color: #005bbf;
  text-decoration: underline;
}

.uled-analytics-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.875rem;
}

.uled-analytics-consent__actions button {
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid #cbd8e6;
  border-radius: 0.625rem;
  background: #f5f8fc;
  color: #263b52;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.uled-analytics-consent__actions button:hover {
  background: #eaf1f9;
}

/* The consent script appends the Decline button first, then Allow. */
.uled-analytics-consent__actions > button:nth-of-type(2) {
  border-color: #0071eb;
  background: #0071eb;
  color: #fff;
}

.uled-analytics-consent__actions > button:nth-of-type(2):hover {
  border-color: #005bbf;
  background: #005bbf;
}

@media (pointer: coarse) {
  .uled-analytics-consent__actions button {
    min-height: 44px;
  }
}

.uled-analytics-settings {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.uled-analytics-settings:hover {
  color: #0071eb;
}

.uled-analytics-consent button:focus-visible,
.uled-analytics-consent a:focus-visible,
.uled-analytics-settings:focus-visible {
  outline: 2px solid #0071eb;
  outline-offset: 3px;
}
