/**
 * Cookie Compliance (hu-manity) — brief top toast, never over tools.
 */

:root {
  --hl-hu-top: 56px;
  --hl-hu-z: 99990;
}

/* Hide by default — JS shows briefly, footer reopens settings */
body.hu-loaded #hu-cookies-head,
body.hu-loaded #hu-revoke,
.hl-hu-chip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Active 3-second toast (mobile + desktop) */
body.hl-hu-show #hu-cookies-head {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed !important;
  top: calc(var(--hl-hu-top) + env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 20px), 380px) !important;
  max-width: 380px !important;
  margin: 0 !important;
  z-index: var(--hl-hu-z) !important;
}

body.hl-hu-show #hu-cookies-notice {
  max-height: 132px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  border: 1px solid rgba(124, 58, 237, 0.12) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important;
  font-size: 11px !important;
  padding: 0 !important;
}

body.hl-hu-show #hu-cookies-notice-about,
body.hl-hu-show #hu-cookies-notice-about-2,
body.hl-hu-show .hu-cookies-preferences-categories,
body.hl-hu-show .hu-text-content,
body.hl-hu-show .hu-notice-toolbar,
body.hl-hu-show .hu-toolbar,
body.hl-hu-show .hu-nav-item,
body.hl-hu-show .hu-notice-maximize,
body.hl-hu-show .hu-notice-download,
body.hl-hu-show .hu-notice-protection,
body.hl-hu-show .hu-notice-close {
  display: none !important;
}

body.hl-hu-show #hu-cookies-notice-consent-choices {
  display: flex !important;
  flex-direction: row !important;
  gap: 5px !important;
  margin: 10px 10px 6px !important;
}

body.hl-hu-show .hu-radio-toggle {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 7px 4px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  text-align: center;
}

body.hl-hu-show .hu-toggle-heading {
  display: block !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

body.hl-hu-show .hu-toggle-label {
  display: none !important;
}

body.hl-hu-show .hu-cookies-save {
  display: none !important;
}

/* Manual open from footer — taller panel, still top-aligned */
body.hl-hu-manual #hu-cookies-head {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed !important;
  top: calc(var(--hl-hu-top) + env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 20px), 420px) !important;
  z-index: var(--hl-hu-z) !important;
  max-height: min(70vh, 420px) !important;
  overflow-y: auto !important;
}

body.hl-hu-manual #hu-cookies-notice {
  max-height: none !important;
  overflow: visible !important;
}

body.hl-hu-manual .hu-cookies-save {
  display: inline-block !important;
}

/* Fingerprint / revoke never overlaps tools */
#hu-revoke,
body.hl-hu-gone #hu-revoke,
body.cookies-accepted #hu-revoke,
body.hu-cookies-accepted #hu-revoke {
  display: none !important;
}

body.hl-hu-gone #hu-cookies-head {
  display: none !important;
}

@media (min-width: 769px) {
  body.hl-hu-show #hu-cookies-head,
  body.hl-hu-manual #hu-cookies-head {
    left: auto !important;
    right: 16px !important;
    transform: none !important;
    width: min(400px, calc(100vw - 32px)) !important;
  }
}

/* Accept row */
.hl-hu-accept-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 10px;
  padding: 0;
}

.hl-hu-accept-btn {
  flex: 1 1 auto;
  padding: 9px 14px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hl-hu-close-btn {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.hl-hu-footer-link {
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
