
.analytics-consent {
  position: fixed;
  z-index: 10000;
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  inset-inline-end: max(16px, env(safe-area-inset-right));
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--grey-200, #e1e6ee);
  border-radius: var(--r-lg, 16px);
  background: var(--grey-0, #fff);
  box-shadow: var(--sh-lg, 0 16px 48px rgb(30 35 48 / 10%));
  color: var(--grey-900, #12141a);
  direction: rtl;
  font-family: Assistant, Heebo, Rubik, system-ui, sans-serif;
  text-align: start;
}

.analytics-consent p {
  max-width: 38ch;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.analytics-consent div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.analytics-consent button,
.analytics-consent a {
  min-height: 44px;
  border-radius: var(--r-md, 12px);
  font: inherit;
  font-weight: 600;
}

.analytics-consent button {
  padding-inline: 20px;
  border: 1px solid var(--grey-300, #cbd2de);
  cursor: pointer;
}

.analytics-consent-accept {
  border-color: var(--blue-500, #3265db) !important;
  background: var(--blue-500, #3265db);
  color: var(--grey-0, #fff);
}

.analytics-consent-accept:hover { background: var(--blue-600, #2a54bc); }

.analytics-consent-reject {
  background: var(--grey-0, #fff);
  color: var(--grey-600, #4e5663);
}

.analytics-consent a {
  display: inline-flex;
  align-items: center;
  color: var(--blue-700, #234190);
  text-underline-offset: 3px;
}

.analytics-consent :focus-visible {
  outline: none;
  box-shadow: var(--sh-focus, 0 0 0 3px rgb(50 101 219 / 28%));
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .analytics-consent {
    inset-inline: 16px;
    width: auto;
    padding: 20px;
  }

  .analytics-consent div { align-items: stretch; }
  .analytics-consent button { flex: 1 1 auto; }
  .analytics-consent a { flex-basis: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .analytics-consent { animation: analytics-consent-enter 240ms cubic-bezier(.2,.8,.2,1); }
}

@keyframes analytics-consent-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
