/* 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 {
  position: fixed !important;
  top: var(--sntz-chatwoot-panel-top, calc(var(--header-h, 64px) + 8px)) !important;
  right: var(--sntz-chatwoot-panel-right, 16px) !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  max-height: min(640px, calc(100dvh - var(--sntz-chatwoot-panel-top, 72px) - 16px)) !important;
  transform-origin: top right !important;
  z-index: 2147483000 !important;
}

body.sntz-chatwoot-header-mode .woot-widget-holder iframe {
  max-height: min(640px, calc(100dvh - var(--sntz-chatwoot-panel-top, 72px) - 16px)) !important;
}

@media (max-width: 640px) {
  body.sntz-chatwoot-header-mode .woot-widget-holder {
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
  }
}

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