/* SNET contact FAB — Touch-style (brand cyan + jiggle; open white X + channel stack) */

.snet-cfab {
  --snet-cfab-size: 72px;
  --snet-cfab-gap: 12px;
  --snet-cfab-right: 18px;
  --snet-cfab-bottom: 22px;
  --snet-cfab-brand: #00c8ff;
  --snet-cfab-brand-2: #0077e6;
  position: fixed;
  right: var(--snet-cfab-right);
  bottom: var(--snet-cfab-bottom);
  z-index: 10080;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--snet-cfab-gap);
  pointer-events: none;
}

.snet-cfab__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--snet-cfab-gap);
  pointer-events: none;
}

.snet-cfab__stack[hidden] {
  display: none !important;
}

.snet-cfab.is-open .snet-cfab__stack {
  pointer-events: auto;
}

.snet-cfab__toggle,
.snet-cfab__item {
  pointer-events: auto;
  width: var(--snet-cfab-size);
  height: var(--snet-cfab-size);
  border-radius: 50%;
  border: 0;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 30, 60, 0.35);
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.snet-cfab__toggle:hover,
.snet-cfab__item:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 22px rgba(0, 100, 160, 0.34);
}

.snet-cfab__toggle:focus-visible,
.snet-cfab__item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.snet-cfab__toggle {
  position: relative;
  background: linear-gradient(145deg, #9af0ff 0%, #00d4ff 46%, #0088ee 100%);
  color: #fff;
  overflow: visible;
  box-shadow:
    0 0 0 3px rgba(180, 245, 255, 0.55),
    0 0 28px 8px rgba(0, 190, 255, 0.85),
    0 12px 28px rgba(0, 24, 48, 0.45);
}

.snet-cfab__face--chat svg {
  width: 34px;
  height: 34px;
}

.snet-cfab__halo {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.55);
  z-index: -1;
  animation: snet-cfab-pulse 2.2s ease-out infinite;
}

.snet-cfab__face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.snet-cfab__face--close {
  display: none;
  color: #6b7280;
}

.snet-cfab:not(.is-open) .snet-cfab__toggle {
  animation: snet-cfab-jiggle 2.8s ease-in-out infinite;
}

.snet-cfab.is-open .snet-cfab__toggle {
  background: #fff;
  color: #6b7280;
  animation: none;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18);
}

.snet-cfab.is-open .snet-cfab__halo {
  display: none;
}

.snet-cfab.is-open .snet-cfab__face--chat {
  display: none;
}

.snet-cfab.is-open .snet-cfab__face--close {
  display: inline-flex;
}

.snet-cfab__item--tg { background: #2aabee; color: #fff; }
.snet-cfab__item--vb { background: #7360f2; color: #fff; }
.snet-cfab__item--phone { background: #ef5350; color: #fff; }
.snet-cfab__item--chat { background: #0077c8; color: #fff; }

.snet-cfab__icon,
.snet-cfab__icon svg,
.snet-cfab__icon .snet-viber-icon,
.snet-cfab__icon .snet-telegram-icon {
  display: block;
  width: 26px;
  height: 26px;
  color: inherit;
  fill: currentColor;
}

.snet-cfab__icon--vb .snet-viber-icon,
.snet-cfab__icon--tg .snet-telegram-icon {
  width: 28px;
  height: 28px;
}

.snet-cfab.is-open .snet-cfab__item {
  animation: snet-cfab-pop .28s ease both;
}

.snet-cfab.is-open .snet-cfab__item:nth-child(1) { animation-delay: .02s; }
.snet-cfab.is-open .snet-cfab__item:nth-child(2) { animation-delay: .05s; }
.snet-cfab.is-open .snet-cfab__item:nth-child(3) { animation-delay: .08s; }
.snet-cfab.is-open .snet-cfab__item:nth-child(4) { animation-delay: .11s; }

@keyframes snet-cfab-jiggle {
  0%, 72%, 100% { transform: rotate(0deg); }
  76% { transform: rotate(-11deg); }
  80% { transform: rotate(10deg); }
  84% { transform: rotate(-8deg); }
  88% { transform: rotate(7deg); }
  92% { transform: rotate(-4deg); }
  96% { transform: rotate(2deg); }
}

@keyframes snet-cfab-pulse {
  0% { transform: scale(0.92); opacity: .55; }
  70% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes snet-cfab-pop {
  from { opacity: 0; transform: translateY(10px) scale(.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/*
 * SOURCE of the light-blue crescent under #snet-cfab (open white X / closed chat):
 * NOT LHC status — it was a.back-to-top (#00b4ff 44px fixed bottom-right, z=40 desktop /
 * z=10030 mobile). FAB owns this corner; kill back-to-top whenever FAB is in the DOM.
 */
body:has(#snet-cfab) a.back-to-top,
body:has(#snet-cfab) > a.back-to-top,
html:has(#snet-cfab) a.back-to-top {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: scale(0) !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  z-index: -1 !important;
}

/* Phone: larger circle in the same corner. When the bottom dock is open, sit above it. */
@media (max-width: 991.98px) {
  .snet-cfab {
    --snet-cfab-size: 64px;
    --snet-cfab-right: 14px;
    --snet-cfab-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    --snet-cfab-gap: 10px;
  }
  .snet-cfab__face--chat svg {
    width: 30px;
    height: 30px;
  }
  body.snet-dock-visible .snet-cfab {
    --snet-cfab-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  }
}

html body #snet-cfab.snet-cfab {
  position: fixed !important;
  right: var(--snet-cfab-right) !important;
  bottom: var(--snet-cfab-bottom) !important;
  z-index: 10080 !important;
  transform: none !important;
}

@media (min-width: 992px) {
  body.snet-chat-open .snet-cfab,
  .snet-cfab.is-open {
    --snet-cfab-bottom: 28px;
  }
}

/* Hide while mobile menu / search overlays */
body.mobile-nav-active .snet-cfab,
body:has(.snet-search.is-open) .snet-cfab,
body:has(.snet-search-wrap.is-open) .snet-cfab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* When LHC chat window is open — tuck FAB aside */
body.snet-chat-open .snet-cfab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/*
 * Hide native LHC launcher (status bubble) — zero footprint under #snet-cfab.
 * LHC inline !important is beaten by snet-chat.js / early status-kill setProperty.
 */
#lhc_status_widget_v2,
#lhc_status_container,
[id$="_status_widget_v2"],
[id^="lhc_status"],
#lhc_container_v2 > #lhc_status_widget_v2,
#lhc_container_v2 iframe[name="lhc_status"],
#lhc_container_v2 iframe[name^="lhc_status"],
iframe[name="lhc_status"],
html:not(.snet-chat-ready) #lhc_container_v2 iframe[name="lhc_status"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  left: -10000px !important;
  top: -10000px !important;
  right: auto !important;
  bottom: auto !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  transform: scale(0) !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  z-index: -1 !important;
}

@media (prefers-reduced-motion: reduce) {
  .snet-cfab:not(.is-open) .snet-cfab__toggle,
  .snet-cfab__halo,
  .snet-cfab.is-open .snet-cfab__item {
    animation: none !important;
  }
}
