/* Floating contact shortcuts */
.codit-static-fab-stack {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 900;
}

/* Nova-only stack (for global plugin) */
.nova-global-fab {
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999 !important;
  position: fixed !important;
  right: 22px !important;
}

/* Nova FAB wrapper for independent positioning */
.nova-global-fab-wrapper {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9950 !important;
}

.nova-global-fab-wrapper .codit-static-fab--nova {
  position: relative;
  z-index: 9950 !important;
}

/* When injected into the theme's stack, don't double-fix position */
.codit-static-fab-stack .nova-global-fab-wrapper,
.nova-global-fab-wrapper.is-in-stack {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  order: -1;
}

/* When Nova overlay is open, shift the floating strip left to avoid
   overlapping the chat input/send area. */
body:has(#nova-quote-overlay.is-visible) .codit-static-fab-stack,
body:has(#nova-quote-overlay.is-visible) .nova-global-fab-wrapper {
  left: 14px !important;
  right: auto !important;
}

/* Reliable fallback: JS toggles this class when chat opens/closes */
body.nova-chat-open .codit-static-fab-stack,
body.nova-chat-open .nova-global-fab-wrapper {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Strong fallback: hide all known floating FAB variants while overlay is visible */
body.nova-chat-open .codit-static-fab,
body:has(#nova-quote-overlay.is-visible) .codit-static-fab,
body:has(#nova-quote-overlay.is-visible) .codit-static-fab-stack,
body:has(#nova-quote-overlay.is-visible) .nova-global-fab-wrapper {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.codit-static-fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.codit-static-fab:hover {
  transform: scale(1.06);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.codit-static-fab:focus-visible {
  outline: 3px solid rgba(11, 122, 61, 0.45);
  outline-offset: 3px;
}

.codit-static-fab--wa {
  background: #25d366;
}

.codit-static-fab--tg {
  background: #229ed9;
}

.codit-static-fab--chat {
  background: linear-gradient(135deg, #0b7a3d, #32965f);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.codit-static-fab--nova {
  width: auto;
  min-width: 96px;
  padding: 0 14px;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b0f17, #0b7a3d 52%, #22d3c7);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(11, 122, 61, 0.32);
}

.codit-static-fab--nova i {
  font-size: 18px;
}

button.codit-static-fab {
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Hide custom-chatbot FABs while Olive overlay is open (their z-index is ~1000001). */
body.nova-chat-open .custom-chatbot-fab-group,
body.nova-chat-open .custom-chatbot-contact-stack,
body.nova-chat-open .custom-chatbot-toggle,
body:has(#nova-quote-overlay.is-visible) .custom-chatbot-fab-group,
body:has(#nova-quote-overlay.is-visible) .custom-chatbot-contact-stack,
body:has(#nova-quote-overlay.is-visible) .custom-chatbot-toggle {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (min-width: 992px) {
  .codit-static-fab-stack {
    gap: 18px;
    right: 24px;
  }
  .codit-static-fab--nova {
    min-width: 110px;
    padding: 0 16px;
  }
}

@media (max-width: 991px) {
  .codit-static-fab-stack {
    right: 12px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .codit-static-fab-stack {
    gap: 8px;
  }
  .codit-static-fab {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  .codit-static-fab--chat {
    font-size: 12px;
  }
  .codit-static-fab--nova {
    min-width: 50px;
    width: 50px;
    padding: 0;
  }
  .codit-static-fab--nova span {
    display: none;
  }
}

/* Mobile (Oct 2026): every floating button stacked at mid-screen on the right, on top of
   hero text and of each other. Dock them bottom-right in one column instead.
   custom-chatbot column (mu-plugins/custom-chatbot.php) = 3 x 46px + 2 x 8px gaps = 154px. */
@media (max-width: 991px) {
  .nova-global-fab,
  .codit-static-fab-stack {
    top: auto !important;
    bottom: 16px !important;
    transform: none !important;
    right: 12px !important;
  }
  .nova-global-fab-wrapper:not(.is-in-stack) {
    top: auto;
    transform: none;
    right: 12px;
    bottom: 178px; /* 16 + 154 + 8 */
  }
  body:has(#nextolive-chat-root) .nova-global-fab-wrapper:not(.is-in-stack) {
    bottom: 254px; /* 92 + 154 + 8 */
  }
}
