body .b24-widget-button-wrapper {
  --ortho-chat-button-size: 84px;
  --ortho-chat-icon-size: 36px;
}

body .b24-widget-button-wrapper.b24-widget-button-visible,
body .b24-widget-button-wrapper :is(.b24-widget-button-inner-container, .b24-widget-button-block, .b24-widget-button-inner-block, .b24-widget-button-icon-container, .b24-widget-button-inner-item, .b24-widget-button-pulse) {
  width: var(--ortho-chat-button-size);
  height: var(--ortho-chat-button-size);
}

body .b24-widget-button-wrapper .b24-widget-button-inner-item .b24-crm-button-icon {
  width: var(--ortho-chat-icon-size);
  height: var(--ortho-chat-icon-size);
}

body .b24-widget-button-wrapper.b24-widget-button-position-bottom-right .b24-widget-button-popup {
  left: auto;
  right: calc(100% + 8px);
  width: 360px;
}

body .b24-widget-button-wrapper .b24-widget-button-popup-inner { flex-wrap: nowrap; }
body .b24-widget-button-wrapper .b24-widget-button-popup-image { flex: none; }
body .b24-widget-button-wrapper .b24-widget-button-popup-content { flex: 1; min-width: 0; width: auto; }

body .b24-widget-button-wrapper .b24-widget-button-popup-name {
  font-size: 17px;
  line-height: 1.25;
}

body .b24-widget-button-wrapper .b24-widget-button-popup-description {
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body .bx-livechat-wrapper .bx-livechat-title { font-size: 17px; }
body .bx-livechat-wrapper .bx-livechat-user-name { font-size: 15px; }
body .bx-livechat-wrapper :is(.bx-livechat-help-subtitle, .bx-im-textarea-input, .bx-im-message-content, .bx-im-message-content-name) {
  font-size: 16px;
  line-height: 1.4;
}
body .bx-livechat-wrapper .bx-im-message-large-font .bx-im-message-content {
  font-size: 35px;
  line-height: 1;
}
body .bx-livechat-wrapper .bx-im-message-content a {
  font-size: inherit;
  line-height: inherit;
}

@media (max-width: 600px) {
  body .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
    --ortho-chat-button-size: 80px;
    --ortho-chat-icon-size: 34px;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  body .b24-widget-button-wrapper.b24-widget-button-position-bottom-right .b24-widget-button-popup {
    right: 0;
    bottom: calc(100% + 10px);
    width: min(340px, calc(100vw - 28px - max(16px, env(safe-area-inset-right))));
  }

  body .b24-widget-button-wrapper .b24-widget-button-popup-triangle { display: none; }

  body .bx-livechat-wrapper.bx-livechat-position-bottom-right:not(.bx-livechat-mobile) {
    right: 14px;
    bottom: 104px;
    max-width: calc(100% - 28px);
    max-height: calc(100vh - 118px);
    max-height: calc(100dvh - 118px);
  }
}
