/* Chatwoot: кнопка в шапке — иконка ассистента без фона (Figma) */
.sntz-chatwoot-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: visible;
  vertical-align: middle;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.sntz-chatwoot-header-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 196, 109, 0.42) 0%, rgba(53, 196, 109, 0.08) 55%, transparent 72%);
  opacity: 0.65;
  animation: sntz-assistant-glow 2.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.sntz-chatwoot-header-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.sntz-chatwoot-header-btn--open::before {
  animation-duration: 1.8s;
}

.sntz-chatwoot-header-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sntz-chatwoot-header-btn:disabled::before {
  animation: none;
  opacity: 0.25;
}

.sntz-chatwoot-header-btn__icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(53, 196, 109, 0.45));
  animation: sntz-assistant-icon-pulse 2.6s ease-in-out infinite;
  will-change: transform;
}

.sntz-chatwoot-header-btn--open .sntz-chatwoot-header-btn__icon {
  animation-duration: 1.8s;
}

@keyframes sntz-assistant-glow {
  0%,
  100% {
    transform: scale(0.9);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes sntz-assistant-icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

body.sntz-chatwoot-header-mode .woot--bubble-holder,
body.sntz-chatwoot-header-mode .woot-widget-bubble {
  display: none !important;
}

body.sntz-chatwoot-header-mode .woot-widget-holder.woot--hide {
  display: none !important;
  pointer-events: none !important;
}

body.sntz-chatwoot-header-mode .woot-widget-holder {
  position: fixed !important;
  top: auto !important;
  right: 16px !important;
  bottom: 16px !important;
  left: auto !important;
  margin: 0 !important;
  width: min(400px, calc(100vw - 32px)) !important;
  height: min(640px, calc(100dvh - 96px)) !important;
  max-height: min(640px, calc(100dvh - 96px)) !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42) !important;
  overflow: hidden !important;
  transform-origin: bottom right !important;
  z-index: 2147483000 !important;
}

body.sntz-chatwoot-header-mode .woot-widget-holder iframe {
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border: 0 !important;
  background: #fff !important;
}

@media (max-width: 640px) {
  body.sntz-chatwoot-mobile-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body.sntz-chatwoot-header-mode .woot-widget-holder {
    top: var(--sntz-chatwoot-vv-top, 0px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: var(--sntz-chatwoot-vv-left, 0px) !important;
    width: var(--sntz-chatwoot-vv-width, 100vw) !important;
    max-width: var(--sntz-chatwoot-vv-width, 100vw) !important;
    height: var(--sntz-chatwoot-vv-height, 100dvh) !important;
    max-height: var(--sntz-chatwoot-vv-height, 100dvh) !important;
    border-radius: 0 !important;
    transform: none !important;
    transform-origin: center center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sntz-chatwoot-header-btn::before,
  .sntz-chatwoot-header-btn__icon {
    animation: none;
  }
}
