/* Somente o widget nativo instalado na página /chat/. */
html[data-bradial-chatwoot] {
  --br-chat-gap: 20px;
  --br-chat-right: calc(var(--br-chat-gap) + env(safe-area-inset-right, 0px));
  --br-chat-bottom: calc(var(--br-chat-gap) + env(safe-area-inset-bottom, 0px));
}

html[data-bradial-chatwoot] .woot--bubble-holder .woot-widget-bubble {
  background: #2f86ea !important; /* DS: azul de interface */
  border-radius: 50% !important;
  right: var(--br-chat-right) !important;
  bottom: var(--br-chat-bottom);
  box-sizing: border-box;
}

html[data-bradial-chatwoot] .woot-widget-bubble:focus-visible {
  outline: 3px solid #2b465c;
  outline-offset: 4px;
}

html[data-bradial-chatwoot] .woot-widget-bubble svg {
  pointer-events: none;
}

@media (min-width: 668px) {
  html[data-bradial-chatwoot] .woot-widget-holder.woot-elements--right:not(.woot--hide) {
    right: var(--br-chat-right);
    bottom: calc(var(--br-chat-bottom) + 84px);
    max-width: calc(100vw - var(--br-chat-right) - 20px);
  }
}

@media (max-width: 667px) {
  html[data-bradial-chatwoot] { --br-chat-gap: 16px; }

  /* O mesmo botão nativo de fechar permanece acessível também no mobile. */
  html[data-bradial-chatwoot] .woot--bubble-holder .woot--close:not(.woot--hide) {
    top: calc(16px + env(safe-area-inset-top, 0px));
    bottom: auto;
    width: 40px;
    height: 40px;
    opacity: 1;
    visibility: visible !important;
    z-index: 2147483001 !important;
  }

  html[data-bradial-chatwoot] .woot--close::before,
  html[data-bradial-chatwoot] .woot--close::after {
    left: 19px;
    top: 10px;
    height: 20px;
  }

  html[data-bradial-chatwoot] .woot-widget-holder:not(.woot--hide):not(.has-unread-view) {
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    bottom: env(safe-area-inset-bottom, 0px);
    width: calc(100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    height: calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: 100dvh;
  }
}
