.analytics-consent-banner {
  position: fixed;
  z-index: 240;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 22px;
  color: #1b1b1d;
  background: rgba(247, 247, 245, 0.98);
  border: 1px solid rgba(19, 19, 21, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(19, 19, 21, 0.2);
  font-family: var(--font-secondary, "Helvetica Neue", Arial, sans-serif);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.analytics-consent-banner.is-closing {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.analytics-consent-banner__copy {
  min-width: 0;
}

.analytics-consent-banner__copy strong {
  display: block;
  margin-bottom: 5px;
  color: #131315;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
}

.analytics-consent-banner__copy p {
  max-width: 670px;
  margin: 0;
  color: rgba(19, 19, 21, 0.7);
  font-size: 0.9rem;
  line-height: 1.48;
}

.analytics-consent-banner__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(142px, 1fr));
  gap: 8px;
  align-items: center;
}

.analytics-consent-banner__actions button,
.analytics-preference-actions button {
  min-height: 44px;
  padding: 10px 15px;
  color: #131315;
  background: transparent;
  border: 1px solid rgba(19, 19, 21, 0.34);
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.15;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.analytics-consent-banner__actions button:hover,
.analytics-preference-actions button:hover {
  color: #ffffff;
  background: #253ff6;
  border-color: #253ff6;
}

.analytics-consent-banner__actions a {
  grid-column: 1 / -1;
  justify-self: start;
  color: rgba(19, 19, 21, 0.72);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.analytics-consent-banner__actions button:focus-visible,
.analytics-consent-banner__actions a:focus-visible,
.analytics-preference-actions button:focus-visible {
  outline: 3px solid #caef56;
  outline-offset: 3px;
}

.analytics-preference-panel {
  max-width: 880px;
  margin-top: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(19, 19, 21, 0.14);
  border-bottom: 1px solid rgba(19, 19, 21, 0.14);
}

.analytics-preference-state {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.analytics-preference-state span:first-child {
  color: rgba(19, 19, 21, 0.54);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

[data-analytics-consent-status] {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: #1b1b1d;
  background: rgba(19, 19, 21, 0.055);
  border: 1px solid rgba(19, 19, 21, 0.12);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 760;
}

[data-analytics-consent-status][data-state="accepted"] {
  background: rgba(202, 239, 86, 0.26);
  border-color: rgba(111, 148, 0, 0.28);
}

[data-analytics-consent-status][data-state="rejected"] {
  background: rgba(37, 63, 246, 0.07);
  border-color: rgba(37, 63, 246, 0.16);
}

.analytics-preference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-preference-actions button {
  min-width: 178px;
}

.analytics-preference-message {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: rgba(19, 19, 21, 0.64);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .analytics-consent-banner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .analytics-consent-banner__actions {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .analytics-consent-banner {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: calc(100% - 20px);
    padding: 16px;
  }

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

  .analytics-consent-banner__actions a {
    grid-column: 1;
  }

  .analytics-preference-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-preference-actions {
    display: grid;
  }

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

@media (prefers-reduced-motion: reduce) {
  .analytics-consent-banner,
  .analytics-consent-banner__actions button,
  .analytics-preference-actions button {
    transition: none;
  }
}
