/* AdeptDEV Jivo Button v1.7.0
 * Copyright (c) 2026 AdeptDEV
 * by AdeptDEV | Telegram: https://t.me/tcpraw
 */

#ad-cookie { z-index: 2147483000 !important; }
#ad-cookie-modal { z-index: 2147483200 !important; }

:root {
  --adev-jivo-right: 18px;
  --adev-jivo-bottom: 20px;
}

.adeptdev-jivo-trigger {
  position: fixed !important;
  left: auto !important;
  right: var(--adev-jivo-right) !important;
  bottom: var(--adev-jivo-bottom) !important;
  z-index: 2147482500 !important;
  min-width: 52px;
  min-height: 48px;
  padding: 0 17px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #ef334d 0%, #b52035 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(181,32,53,.32), inset 0 1px 0 rgba(255,255,255,.12);
  font: 750 13px/1 "Onest", Arial, sans-serif;
  letter-spacing: -.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform: translate3d(0,0,0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .2s ease, visibility .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
}

.adeptdev-jivo-trigger[hidden] { display: inline-flex !important; }

.adeptdev-jivo-trigger.is-hidden,
html.adeptdev-jivo-chat-open .adeptdev-jivo-trigger,
html.adeptdev-cookie-layer-open .adeptdev-jivo-trigger {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0,8px,0) scale(.94) !important;
}

.adeptdev-jivo-trigger:hover {
  transform: translate3d(0,-3px,0);
  box-shadow: 0 19px 42px rgba(181,32,53,.40), inset 0 1px 0 rgba(255,255,255,.14);
}
.adeptdev-jivo-trigger:active { transform: translate3d(0,-1px,0) scale(.97); }
.adeptdev-jivo-trigger:focus-visible { outline: 3px solid rgba(239,51,77,.28); outline-offset: 3px; }

.adeptdev-jivo-trigger__icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: grid;
  place-items: center;
}
.adeptdev-jivo-trigger__icon svg { width: 100%; height: 100%; fill: currentColor; }

/* Native Jivo launcher is never used. The official chat window remains intact;
   only launcher-sized nodes marked by JS are suppressed. */
.adeptdev-jivo-native-launcher {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(.8) !important;
}

@media (max-width: 900px) {
  :root {
    --adev-jivo-right: max(14px, env(safe-area-inset-right));
    --adev-jivo-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .adeptdev-jivo-trigger {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    padding: 0 !important;
    border-radius: 18px !important;
    gap: 0 !important;
    box-shadow: 0 13px 30px rgba(181,32,53,.34), inset 0 1px 0 rgba(255,255,255,.16) !important;
  }

  .adeptdev-jivo-trigger__text { display: none !important; }
  .adeptdev-jivo-trigger__icon { width: 23px !important; height: 23px !important; flex-basis: 23px !important; }
}

@media (max-width: 390px) {
  .adeptdev-jivo-trigger {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    border-radius: 16px !important;
  }
  .adeptdev-jivo-trigger__icon { width: 21px !important; height: 21px !important; flex-basis: 21px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .adeptdev-jivo-trigger { transition: none !important; }
}


/* v1.7.0 — safe native chat preservation + single launcher policy */
.adeptdev-jivo-close {
  position: fixed !important;
  top: calc(max(12px, env(safe-area-inset-top)) + 6px) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  z-index: 2147483646 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: none !important;
  place-items: center !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 14px !important;
  background: rgba(24,24,28,.86) !important;
  color: #fff !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.28) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}
.adeptdev-jivo-close svg {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
  stroke-linecap: round !important;
}
@media (max-width: 900px) {
  html.adeptdev-jivo-chat-open .adeptdev-jivo-close {
    display: grid !important;
  }
}

/* Hide only elements that JS positively identifies as the collapsed native Jivo launcher. */
html .adeptdev-jivo-native-launcher {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
