.chx-analytics-panel,
.chx-analytics-settings {
  font-family: var(--body, "DM Sans", sans-serif);
  color: #202324;
  box-sizing: border-box;
}

.chx-analytics-panel {
  width: min(100% - 32px, 1080px);
  margin: 14px auto;
  padding: 17px 20px;
  border: 1px solid #d7dbdb;
  border-radius: 4px;
  background: #f4f5f5;
  box-shadow: 0 2px 8px #17191a12;
  animation: chx-analytics-arrive 180ms ease-out both;
}

.chx-analytics-panel[hidden] {
  display: none;
}

.chx-analytics-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 28px;
  row-gap: 13px;
}

.chx-analytics-copy {
  min-width: 0;
}

.chx-analytics-title {
  margin: 0 0 3px;
  color: #202324;
  font-family: var(--display, "Outfit", sans-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.25;
}

.chx-analytics-description {
  max-width: 720px;
  margin: 0;
  color: #535a5b;
  font-size: 13px;
  line-height: 1.55;
}

.chx-analytics-policy {
  display: inline-block;
  margin-top: 4px;
  color: #343b3c;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.chx-analytics-policy:hover {
  color: #111515;
}

.chx-analytics-status {
  margin: 8px 0 0;
  color: #363c3d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.chx-analytics-status[hidden] {
  display: none;
}

.chx-analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chx-analytics-button,
.chx-analytics-settings,
.chx-analytics-close {
  min-height: 42px;
  border: 1px solid #222627;
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.chx-analytics-button {
  min-width: 132px;
  padding: 9px 13px;
}

.chx-analytics-allow {
  color: #f7f8f8;
  background: #202324;
}

.chx-analytics-allow:hover {
  background: #3b4142;
}

.chx-analytics-essential,
.chx-analytics-close {
  color: #202324;
  background: transparent;
}

.chx-analytics-essential:hover,
.chx-analytics-close:hover,
.chx-analytics-settings:hover {
  background: #e6e9e9;
}

.chx-analytics-settings {
  display: block;
  width: max-content;
  min-height: 34px;
  margin: 8px 16px 16px auto;
  padding: 6px 10px;
  border-color: #c9cece;
  color: #535a5b;
  background: #f4f5f5;
  font-size: 12px;
  font-weight: 500;
}

.chx-analytics-close {
  grid-column: 2;
  justify-self: end;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

.chx-analytics-close[hidden] {
  display: none;
}

.chx-analytics-panel :focus-visible,
.chx-analytics-settings:focus-visible {
  outline: 3px solid #52595a;
  outline-offset: 3px;
}

@keyframes chx-analytics-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 650px) {
  .chx-analytics-panel {
    width: calc(100% - 24px);
    margin: 12px auto;
    padding: 15px 16px;
  }

  .chx-analytics-content {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .chx-analytics-title {
    font-size: 18px;
  }

  .chx-analytics-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .chx-analytics-button {
    min-width: 0;
    width: 100%;
    padding-inline: 8px;
  }

  .chx-analytics-close {
    grid-column: 1;
    justify-self: start;
  }

  .chx-analytics-settings {
    margin-right: 12px;
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chx-analytics-panel {
    animation: none;
  }

  .chx-analytics-button,
  .chx-analytics-settings,
  .chx-analytics-close {
    transition: none;
  }
}
