.st-cookie-notice[hidden] {
  display: none !important;
}

.st-cookie-notice {
  position: fixed;
  right: max(var(--st-space-md), env(safe-area-inset-right));
  bottom: max(var(--st-space-md), env(safe-area-inset-bottom));
  z-index: 900;
  width: min(520px, calc(100vw - 40px));
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 20px;
  background: #ffffff;
  color: #0f172a;
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.16),
    0 8px 24px rgba(37, 99, 235, 0.1);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: st-cookie-notice-enter 240ms ease-out both;
}

.st-cookie-notice__accent {
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
}

.st-cookie-notice__content {
  padding: var(--st-card-padding);
}

.st-cookie-notice p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.58;
}

.st-cookie-notice__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--st-content-gap);
  margin-top: var(--st-space-sm);
}

.st-cookie-notice__link,
.st-cookie-notice__link:visited {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.st-cookie-notice__link:hover,
.st-cookie-notice__link:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.st-cookie-notice__button {
  min-width: 116px;
  min-height: 44px;
  margin: 0;
  padding: 11px 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #6d3df2 100%);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.st-cookie-notice__button:hover,
.st-cookie-notice__button:focus-visible {
  box-shadow: 0 14px 30px rgba(76, 68, 230, 0.3);
  transform: translateY(-1px);
}

.st-cookie-notice__button:focus-visible,
.st-cookie-notice__link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 3px;
}

html.st-theme-dark .st-cookie-notice {
  border-color: var(--st-dark-border-strong, rgba(184, 194, 215, 0.22));
  background: var(--st-dark-card-raised, #242b3a);
  color: var(--st-dark-text-strong, #f4f7fb);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html.st-theme-dark .st-cookie-notice p {
  color: var(--st-dark-text, #d6dbe5);
}

html.st-theme-dark .st-cookie-notice__link,
html.st-theme-dark .st-cookie-notice__link:visited {
  color: var(--st-dark-primary, #6ea8ff);
}

html.st-theme-dark .st-cookie-notice__link:hover,
html.st-theme-dark .st-cookie-notice__link:focus-visible {
  color: #9bc2ff;
}

@keyframes st-cookie-notice-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .st-cookie-notice {
    right: max(var(--st-space-xs), env(safe-area-inset-right));
    bottom: max(var(--st-space-xs), env(safe-area-inset-bottom));
    left: max(var(--st-space-xs), env(safe-area-inset-left));
    width: auto;
    max-width: none;
    border-radius: 16px;
  }

  .st-cookie-notice__content {
    padding: var(--st-card-padding);
  }

  .st-cookie-notice p {
    font-size: 13px;
    line-height: 1.5;
  }

  .st-cookie-notice__actions {
    justify-content: space-between;
    gap: var(--st-space-xs);
    margin-top: var(--st-space-sm);
  }

  .st-cookie-notice__button {
    min-width: 124px;
  }
}

@media (max-width: 374px) {
  .st-cookie-notice__actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: var(--st-space-2xs);
  }

  .st-cookie-notice__button,
  .st-cookie-notice__link {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-cookie-notice {
    animation: none;
  }

  .st-cookie-notice__button {
    transition: none;
  }
}
