.emc-cookie-settings {
  display: block;
  width: fit-content;
  margin: .4em auto 0;
  color: inherit;
  font-size: .85em;
  text-decoration: underline;
  text-underline-offset: .16em;
}

html:has(.emc-statistics-panel[open]) {
  overflow: hidden;
}

.emc-statistics-panel {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(31rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(1.2rem, 5vw, 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e3e0df;
  border-radius: 0;
  background: #fff;
  color: #1d1b1b;
  box-shadow: 0 .6rem 2rem #0003;
  font: 1rem/1.55 system-ui, sans-serif;
  text-align: center;
}

.emc-statistics-panel::backdrop {
  background: rgb(24 20 20 / 72%);
  backdrop-filter: blur(4px);
}

.emc-statistics-panel:not([open]),
.emc-statistics-panel [hidden] {
  display: none !important;
}

.emc-statistics-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 1rem;
  border: 1px solid #ead6d7;
  border-radius: 0;
  background: #fff;
  color: #a3121b;
  font-size: 1.2rem;
  line-height: 1;
}

.emc-statistics-panel h2 {
  margin: 0 0 .65rem;
  color: inherit;
  font: 700 1.35rem/1.25 system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

.emc-statistics-panel h2:focus {
  outline: none;
}

.emc-statistics-panel p {
  margin: 0 0 .8rem;
  color: #504b4b;
}

.emc-statistics-panel p:empty {
  display: none;
}

.emc-statistics-panel a {
  color: #a3121b;
  text-decoration: underline;
  text-underline-offset: .13em;
}

.emc-statistics-panel .emc-statistics-links {
  margin-bottom: 1rem;
  font-size: .87rem;
}

.emc-statistics-options {
  margin: .75rem 0 1rem;
  text-align: left;
}

.emc-statistics-options > div,
.emc-statistics-options > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0;
  padding: .65rem .15rem;
  border-bottom: 1px solid #e9e6e6;
  font: inherit;
}

.emc-statistics-options span {
  color: #504b4b;
  font-size: .85rem;
  white-space: nowrap;
}

.emc-statistics-options input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: #a3121b;
}

.emc-statistics-actions {
  display: grid;
  gap: .85rem;
  padding-top: 1rem;
  border-top: 1px solid #e9e6e6;
}

.emc-statistics-panel .emc-statistics-actions button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: .5rem .8rem;
  border: 1px solid #a3121b;
  border-radius: 0;
  background: #fff;
  color: #8f1119;
  font: 650 .95rem/1.3 system-ui, sans-serif;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: none;
}

.emc-statistics-panel .emc-statistics-actions button[data-choice="allow"],
.emc-statistics-panel .emc-statistics-actions button[data-choice="save"] {
  background: #a3121b;
  color: #fff;
}

.emc-statistics-panel .emc-statistics-actions button[data-choice="allow"] {
  min-height: 58px;
}

.emc-statistics-panel .emc-statistics-actions button[data-choice="allow"] + button[data-choice="deny"] {
  min-height: 48px;
  margin-top: .55rem;
}

.emc-statistics-panel .emc-statistics-actions button[data-choice="settings"],
.emc-statistics-panel .emc-statistics-actions button[data-choice="back"],
.emc-statistics-panel .emc-statistics-actions button[data-choice="close"] {
  border-color: transparent;
  color: #504b4b;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: .13em;
}

.emc-statistics-panel :is(a, button, input):focus-visible {
  outline: 2px solid #2458a3;
  outline-offset: 3px;
}

.emc-statistics-panel .emc-statistics-actions button:hover {
  box-shadow: inset 0 0 0 100px rgb(0 0 0 / 6%);
}
