.fxw-hn-root[hidden] {
  display: none !important;
}

body.menu-open .fxw-hn-root,
body.mega-open .fxw-hn-root,
body:has(.mobile-menu[data-open="true"]) .fxw-hn-root,
body:has(#mobile-menu[data-open="true"]) .fxw-hn-root,
body:has(#mega-tools:not([hidden])) .fxw-hn-root,
body:has(.cmplz-cookiebanner.cmplz-show) .fxw-hn-root {
  visibility: hidden !important;
  pointer-events: none !important;
}

.fxw-hn-root {
  position: fixed;
  z-index: 70;
  right: 24px;
  bottom: max(24px, var(--fxw-hn-bottom-clearance, 0px));
  width: min(368px, calc(100vw - 48px));
  color: var(--c-text, #262223);
  font: 400 15px/1.5 var(--font-body, system-ui, sans-serif);
}

.fxw-hn-root *, .fxw-hn-root *::before {
  box-sizing: border-box;
}

.fxw-hn-scrim {
  display: none;
}

.fxw-hn-card {
  position: relative;
  max-height: calc(100vh - 24px - max(24px, var(--fxw-hn-bottom-clearance, 0px)));
  max-height: calc(100dvh - 24px - max(24px, var(--fxw-hn-bottom-clearance, 0px)));
  overflow: auto;
  padding: 20px 20px 12px;
  border: 1px solid var(--c-border, #dcdfe5);
  border-top: 3px solid var(--c-orange-500, #f45b15);
  border-radius: var(--r-lg, 16px);
  background: #fff;
  box-shadow: var(--sh-3, 0 16px 40px rgba(22, 19, 20, .16));
  animation: fxw-hn-in 160ms ease-out;
  overscroll-behavior: contain;
}

.fxw-hn-card:focus {
  outline: none;
}

.fxw-hn-card .fxw-hn-label {
  margin: 0 44px 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-orange-700, #ad390a);
}

.fxw-hn-card #fxw-hn-title {
  margin: 0 44px 8px 0;
  color: var(--c-ink-950, #161314);
  font: 700 clamp(21px, 4.5vw, 24px)/1.2 var(--font-head, system-ui, sans-serif);
}

.fxw-hn-card #fxw-hn-description {
  margin: 0 0 16px;
  color: var(--c-text-muted, #5a5455);
}

.fxw-hn-card button, .fxw-hn-card a {
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  border-radius: var(--r-md, 10px);
}

.fxw-hn-card a:focus-visible, .fxw-hn-card button:focus-visible {
  outline: 2px solid var(--c-blue-600, #0062ff);
  outline-offset: 2px;
}

.fxw-hn-card button {
  padding: 6px 10px;
  background: #fff;
  color: var(--c-ink-900, #231f20);
  cursor: pointer;
}

.fxw-hn-card .fxw-hn-close {
  position: absolute;
  inset: 8px 8px auto auto;
  padding: 0;
  border: 0;
  font-size: 25px;
  line-height: 1;
}

.fxw-hn-card .fxw-hn-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  text-decoration: none;
  line-height: 1.3;
}

.fxw-hn-action svg {
  flex: none;
}

.fxw-hn-action small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.fxw-hn-card .fxw-hn-telegram {
  color: #fff;
  background: var(--c-blue-700, #0050d1);
}

.fxw-hn-card .fxw-hn-telegram:hover {
  background: var(--c-blue-800, #003c9e);
}

.fxw-hn-email-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, auto);
  gap: 6px;
}

.fxw-hn-card .fxw-hn-email, .fxw-hn-card .fxw-hn-copy {
  color: var(--c-ink-900, #231f20);
  border: 1px solid var(--c-border, #dcdfe5);
  background: #fff;
}

.fxw-hn-card .fxw-hn-email:hover, .fxw-hn-card button:hover {
  background: #f5f6f8;
}

.fxw-hn-card .fxw-hn-copy {
  font-size: 13px;
}

.fxw-hn-card .fxw-hn-later {
  display: block;
  margin: 4px auto 0;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--c-text-muted, #5a5455);
  font-size: 14px;
}

@media (max-width: 1023px) {
  .fxw-hn-root {
    inset: 0;
    width: auto;
    display: grid;
    place-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom), var(--fxw-hn-bottom-clearance, 0px)) max(12px, env(safe-area-inset-left));
  }

  .fxw-hn-scrim {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(22, 19, 20, .48);
    touch-action: none;
  }

  .fxw-hn-card {
    width: min(400px, 100%);
    max-height: calc(100vh - 16px - max(16px, var(--fxw-hn-bottom-clearance, 0px)));
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) -
      max(16px, env(safe-area-inset-bottom), var(--fxw-hn-bottom-clearance, 0px)));
    padding-inline: 16px;
  }
}

@keyframes fxw-hn-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fxw-hn-card { animation: none; }
}
