.cookie-consent {
  --cookie-accent: #645ffc;
  --cookie-text: #f5f8ff;
  --cookie-text-secondary: #b4bac6;
  position: fixed;
  z-index: 1100;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 16px;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 40px));
  padding: 18px;
  color: var(--cookie-text);
  background:
    linear-gradient(135deg, rgba(41, 40, 55, 0.96), rgba(17, 18, 27, 0.96));
  border: 1px solid rgba(159, 184, 253, 0.22);
  border-radius: 16px;
  box-shadow:
    0 20px 58px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  font-size: 14px;
  line-height: 1.5;
}

html[data-cookie-consent="pending"] .cookie-consent {
  display: grid;
}

.cookie-consent__copy {
  display: contents;
}

.cookie-consent__copy strong {
  grid-column: 1 / -1;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cookie-consent__copy a {
  grid-column: 1;
  width: fit-content;
  color: var(--cookie-text-secondary);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__copy a:hover {
  color: #d8defe;
}

.cookie-consent__actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-consent__action {
  flex: 0 0 auto;
  min-width: 88px;
  min-height: 40px;
  padding: 0 18px;
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.cookie-consent__action--primary {
  background: var(--cookie-accent);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(100, 95, 252, 0.28);
}

.cookie-consent__action--secondary {
  color: var(--cookie-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent__action--primary:hover {
  background: #7671ff;
}

.cookie-consent__action--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.cookie-consent__action:focus-visible,
.cookie-consent__copy a:focus-visible {
  outline: 3px solid rgba(159, 184, 253, 0.42);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .cookie-consent {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    gap: 12px 14px;
    padding: 16px;
  }

  .cookie-consent__action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-consent__action,
  .cookie-consent__copy a {
    transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
  }

  .cookie-consent__action:hover {
    transform: translateY(-1px);
  }

  html[data-cookie-consent="pending"] .cookie-consent {
    animation: cookie-consent-in 180ms ease-out both;
  }

  @keyframes cookie-consent-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
