#refreshTagsButton {
    cursor: default;
    opacity: 0.7;
}
#refreshTagsButton.active {
    cursor: pointer;
    opacity: 1;
}

@import "impersonate.css";

body.has-chat-widget,
body.has-rcw-widget {
    --chat-launcher-size: 58px;
    --widget-gap: 18px;
    --widget-stack-right: 24px;
    --widget-stack-bottom: 24px;
}

body.has-chat-widget {
    --chat-launcher-bottom: var(--widget-stack-bottom);
    --chat-panel-bottom: calc(var(--chat-launcher-bottom) + var(--chat-launcher-size) + 10px);
    --chat-page-safe-space: calc(var(--chat-launcher-bottom) + var(--chat-launcher-size) + 16px);
    --chat-visual-viewport-height: 100svh;
    --chat-touch-inset-top: 10px;
    --chat-touch-inset-side: 8px;
    --chat-touch-inset-bottom: 8px;
}

body.has-rcw-widget {
    --rcw-widget-size: 60px;
    --rcw-widget-ring-size: 92px;
    --rcw-bottom: calc(var(--widget-stack-bottom) + var(--chat-launcher-size) + var(--widget-gap));
}

body.has-chat-widget.has-rcw-widget {
    --chat-page-safe-space: calc(var(--rcw-bottom) + var(--rcw-widget-size) + 16px);
}

body.has-chat-widget .app-content.content::after {
    content: "";
    display: block;
    height: var(--chat-page-safe-space);
}

#rcw-phone.rcw-phone {
    width: var(--rcw-widget-size) !important;
    height: var(--rcw-widget-size) !important;
    right: var(--widget-stack-right) !important;
    bottom: var(--rcw-bottom) !important;
    opacity: 1 !important;
    z-index: 1198 !important;
}

#rcw-phone .rcw-phone-content {
    width: 100%;
    height: 100%;
}

#rcw-phone .rcw-circle {
    width: var(--rcw-widget-ring-size);
    height: var(--rcw-widget-ring-size);
}

#rcw-phone .rcw-circle-fill {
    width: 72px;
    height: 72px;
}

#rcw-phone .rcw-img-circle {
    width: var(--rcw-widget-size);
    height: var(--rcw-widget-size);
}

#chat-launcher.elev-chat-launcher {
    right: var(--widget-stack-right) !important;
    bottom: var(--chat-launcher-bottom) !important;
}

#chat-widget.elev-chat-widget:not(.elev-chat-widget--expanded) {
    right: var(--widget-stack-right) !important;
    bottom: var(--chat-panel-bottom) !important;
}

#chat-widget.elev-chat-widget--expanded {
    right: var(--widget-stack-right) !important;
}

@media (max-width: 991px) {
    body.has-chat-widget,
    body.has-rcw-widget {
        --widget-stack-right: 16px;
        --widget-stack-bottom: 16px;
    }

    body.has-chat-widget {
        --chat-launcher-bottom: 16px;
        --chat-page-safe-space: calc(var(--chat-launcher-bottom) + var(--chat-launcher-size) + 16px);
    }

    body.has-rcw-widget {
        --rcw-bottom: 88px;
    }

    body.has-chat-widget.has-rcw-widget {
        --chat-page-safe-space: calc(var(--rcw-bottom) + var(--rcw-widget-size) + 16px);
    }

    #rcw-phone.rcw-phone {
        right: 16px !important;
        bottom: 88px !important;
    }

    #chat-launcher.elev-chat-launcher {
        right: 16px !important;
        bottom: 16px !important;
    }

    #chat-widget.elev-chat-widget,
    #chat-widget.elev-chat-widget--expanded {
        bottom: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
}

body.chat-touch-device.chat-widget-open #rcw-phone.rcw-phone {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.chat-touch-device.chat-widget-open #chat-launcher.elev-chat-launcher,
body.chat-desktop-mode-mobile.chat-widget-open #chat-launcher.elev-chat-launcher {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.chat-touch-device.has-chat-widget,
body.chat-touch-device.has-rcw-widget {
    --widget-stack-right: 16px;
    --widget-stack-bottom: 16px;
}

body.chat-touch-device.has-chat-widget {
    --chat-launcher-bottom: 16px;
    --chat-page-safe-space: calc(var(--chat-launcher-bottom) + var(--chat-launcher-size) + 16px);
}

body.chat-touch-device.has-rcw-widget {
    --rcw-bottom: 88px;
}

body.chat-touch-device.has-chat-widget.has-rcw-widget {
    --chat-page-safe-space: calc(var(--rcw-bottom) + var(--rcw-widget-size) + 16px);
}

body.chat-touch-device #rcw-phone.rcw-phone {
    right: 16px !important;
    bottom: 88px !important;
}

body.chat-touch-device #chat-launcher.elev-chat-launcher {
    right: 16px !important;
    bottom: 16px !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget,
body.chat-touch-device #chat-widget.elev-chat-widget--expanded {
    top: var(--chat-touch-inset-top) !important;
    left: var(--chat-touch-inset-side) !important;
    right: var(--chat-touch-inset-side) !important;
    bottom: auto !important;
    width: auto !important;
    height: calc(var(--chat-visual-viewport-height) - var(--chat-touch-inset-top) - var(--chat-touch-inset-bottom)) !important;
    max-height: calc(var(--chat-visual-viewport-height) - var(--chat-touch-inset-top) - var(--chat-touch-inset-bottom)) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28) !important;
}

body.chat-touch-device.chat-input-focused #chat-widget.elev-chat-widget,
body.chat-touch-device.chat-input-focused #chat-widget.elev-chat-widget--expanded {
    transition: none !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget {
    transform: translateY(calc(100% + 24px)) !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget.is-open {
    transform: translateY(0) !important;
}

body.chat-touch-device #chat-widget .chat-widget__header {
    padding-top: max(0.85rem, env(safe-area-inset-top)) !important;
}

body.chat-touch-device #chat-widget .chat-widget__body {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    height: calc(100% - 54px) !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget--has-thread .chat-widget__sidebar {
    display: none !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget--has-thread .chat-widget__thread {
    display: flex !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget--has-thread .chat-widget__mobile-back {
    display: inline-flex !important;
}

body.chat-touch-device #chat-widget.elev-chat-widget:not(.elev-chat-widget--has-thread) .chat-widget__thread {
    display: none !important;
}

body.chat-touch-device #chat-widget .chat-widget__thread-header,
body.chat-touch-device #chat-widget .chat-widget__composer {
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
}

body.chat-touch-device #chat-widget input,
body.chat-touch-device #chat-widget textarea,
body.chat-touch-device #chat-widget select {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
}

body.chat-touch-device #chat-widget .chat-participant-picker__input,
body.chat-touch-device #chat-widget .chat-widget__search-bar input,
body.chat-touch-device #chat-widget .chat-widget__composer-row textarea,
body.chat-touch-device #chat-widget .chat-message__edit-textarea,
body.chat-touch-device #chat-widget select {
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: border-color 150ms ease, background-color 150ms ease !important;
}

body.chat-touch-device #chat-widget .chat-participant-picker__input:focus,
body.chat-touch-device #chat-widget .chat-widget__search-bar input:focus,
body.chat-touch-device #chat-widget .chat-widget__composer-row textarea:focus,
body.chat-touch-device #chat-widget .chat-message__edit-textarea:focus,
body.chat-touch-device #chat-widget select:focus {
    border-color: var(--chat-primary) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
    background: #fff !important;
}

body.chat-touch-device #chat-widget .chat-widget__composer {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom)) !important;
}

body.chat-touch-device #chat-widget .chat-widget__sidebar {
    border-right: 0 !important;
}

body.chat-desktop-mode-mobile #chat-widget.elev-chat-widget,
body.chat-desktop-mode-mobile #chat-widget.elev-chat-widget--expanded {
    zoom: var(--chat-desktop-zoom, 1);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100vw / var(--chat-desktop-zoom, 1)) !important;
    height: calc(100dvh / var(--chat-desktop-zoom, 1)) !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 0;
    pointer-events: none;
    transform: none !important;
    transition: none !important;
}

body.chat-desktop-mode-mobile #chat-widget.elev-chat-widget.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

body.chat-desktop-mode-mobile #chat-widget .chat-widget__body {
    height: calc(100% - 54px) !important;
}

body.chat-desktop-mode-mobile #chat-widget .chat-widget__composer-row textarea {
    max-height: 80px !important;
}

body.chat-desktop-mode-mobile #chat-launcher.elev-chat-launcher {
    zoom: var(--chat-desktop-zoom, 1);
    right: calc(16px / var(--chat-desktop-zoom, 1)) !important;
    bottom: calc(16px / var(--chat-desktop-zoom, 1)) !important;
}
