/*
  Aegiscan shared cookie-notice — premium dark card, bottom-anchored.
  Markup snippet (insert at end of <body class="funnel-page">):

  <div class="aegiscan-cookie" id="aegiscan-cookie" role="dialog"
       aria-label="Использование cookie" aria-live="polite" aria-hidden="true">
    <div class="aegiscan-cookie__text">
      Мы используем cookie для работы сайта, аналитики и безопасности сервиса.
    </div>
    <div class="aegiscan-cookie__actions">
      <button class="aegiscan-cookie__btn aegiscan-cookie__btn--primary" data-cookie="accept">Принять</button>
      <button class="aegiscan-cookie__btn" data-cookie="necessary">Только необходимые</button>
      <a class="aegiscan-cookie__link" href="cookie-policy.html">Подробнее</a>
    </div>
  </div>
*/

.aegiscan-cookie {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120%);
  z-index: 99998;
  width: min(720px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-elevated, #121317);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.45s ease,
              visibility 0s linear 0.45s;
}

.aegiscan-cookie--visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.45s ease,
              visibility 0s linear 0s;
}

.aegiscan-cookie--hidden {
  /* After consent saved — fully remove from layout/a11y tree. */
  display: none !important;
}

.aegiscan-cookie__text {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #abaebb);
  max-width: 420px;
}

.aegiscan-cookie__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.aegiscan-cookie__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  font-family: var(--font-ui, "Geist", sans-serif);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--text, #fff);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.18));
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.aegiscan-cookie__btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.aegiscan-cookie__btn:focus-visible {
  outline: 2px solid var(--accent, #b4462d);
  outline-offset: 2px;
}

.aegiscan-cookie__btn--primary {
  background: var(--text, #fff);
  color: var(--bg, #040406);
  border-color: var(--text, #fff);
}

.aegiscan-cookie__btn--primary:hover {
  background: #e8e8e8;
  border-color: #e8e8e8;
  color: var(--bg, #040406);
}

.aegiscan-cookie__link {
  font-family: var(--font-ui, "Geist", sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #abaebb);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.aegiscan-cookie__link:hover {
  color: var(--text, #fff);
}

.aegiscan-cookie__link:focus-visible {
  outline: 2px solid var(--accent, #b4462d);
  outline-offset: 2px;
}

/* Mobile: stack into a column, full-width buttons. */
@media (max-width: 640px) {
  .aegiscan-cookie {
    flex-direction: column;
    align-items: stretch;
    bottom: 16px;
    width: calc(100vw - 24px);
    padding: 18px 18px;
    gap: 16px;
  }
  .aegiscan-cookie__text {
    max-width: none;
  }
  .aegiscan-cookie__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .aegiscan-cookie__btn,
  .aegiscan-cookie__link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aegiscan-cookie,
  .aegiscan-cookie--visible {
    transition: opacity 0.2s ease, visibility 0s linear 0s;
  }
}
