.analytics-consent-banner,
.analytics-preferences-panel {
  box-sizing: border-box;
  color: #1d1738;
  font-family: Nunito, Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

.analytics-consent-banner {
  position: fixed;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  left: 50%;
  z-index: 10020;
  display: flex;
  width: min(1080px, calc(100% - 36px));
  min-height: 60px;
  margin: 0;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transform: translateX(-50%);
  border: 1px solid #d9d0ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(29, 23, 56, 0.16);
  pointer-events: none;
}

.analytics-consent-banner p {
  min-width: 0;
  margin: 0;
  color: #403858;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.analytics-consent-banner a,
.analytics-preferences-link {
  color: #5c2cc5;
  font-weight: 850;
  text-underline-offset: 2px;
}

.analytics-consent-banner a,
.analytics-consent-banner button {
  pointer-events: auto;
}

.analytics-consent-actions {
  display: grid;
  min-width: min(270px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.analytics-consent-button,
.analytics-choice-group button,
.analytics-preferences-close {
  min-height: 42px;
  border-radius: 7px;
  font: 850 0.86rem/1 Nunito, Inter, system-ui, sans-serif;
  cursor: pointer;
}

.analytics-consent-button {
  min-width: 0;
  padding: 0 14px;
}

.analytics-consent-button-primary {
  border: 1px solid #6d35db;
  background: #6d35db;
  color: #ffffff;
}

.analytics-consent-button-secondary {
  border: 1px solid #6d35db;
  background: #ffffff;
  color: #4e24ac;
}

.analytics-consent-button:hover,
.analytics-consent-button:focus-visible,
.analytics-choice-group button:hover,
.analytics-choice-group button:focus-visible,
.analytics-preferences-close:hover,
.analytics-preferences-close:focus-visible {
  outline: 3px solid rgba(109, 53, 219, 0.22);
  outline-offset: 2px;
}

.analytics-preferences-panel {
  position: fixed;
  z-index: 10030;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid #d9d0ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(29, 23, 56, 0.2);
}

.analytics-preferences-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.analytics-preferences-heading span {
  color: #087b68;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.analytics-preferences-heading h2 {
  margin: 3px 0 0;
  color: #1d1738;
  font-size: 1.35rem;
  line-height: 1.2;
}

.analytics-preferences-panel > p {
  margin: 12px 0;
  color: #514967;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.analytics-preferences-close {
  display: grid;
  width: 40px;
  min-width: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #d9d0ef;
  background: #ffffff;
  color: #3c315c;
  font-size: 1.25rem;
}

.analytics-choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 13px;
}

.analytics-choice-group button {
  border: 1px solid #bdb2dc;
  background: #f8f6fc;
  color: #342852;
}

.analytics-choice-group button[aria-pressed="true"] {
  border-color: #6d35db;
  background: #6d35db;
  color: #ffffff;
}

.analytics-preferences-link {
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  .analytics-consent-banner {
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    min-height: 0;
    padding: 13px;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .analytics-consent-banner p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .analytics-consent-actions {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .analytics-preferences-panel {
    right: 10px;
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
    left: 10px;
    width: calc(100% - 20px);
  }

  .analytics-consent-banner {
    width: calc(100% - 20px);
    bottom: 10px;
  }

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