#tcChatFallback,
#ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #141414;
    color: #fff;
    box-shadow: 0 0 0 1px #ffffff26, 0 0 12px #ffffff1f, 0 3px 10px #0003;
    cursor: pointer;
    transition: filter .2s, transform .2s;
}

#tcChatFallback:hover,
#ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher:hover { filter: brightness(1.08); }

#tcChatFallback:active,
#ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher:active { transform: scale(.96); }

#ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher:focus-visible {
    outline: 2px solid #888;
    outline-offset: 6px;
}

#ag-chat-widget-root.shared-chat-widget .ag-chat-launcher-pulse { display: none; }

.shared-chat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: transparent;
    color: inherit;
    font-size: 20px;
}

#ag-chat-widget-root.shared-chat-widget .shared-chat-icon svg,
.shared-chat-icon svg,
.shared-chat-open-icon img {
    width: 30px;
    height: 30px;
    transform: none;
}

.shared-chat-open-icon {
    display: grid;
    place-items: center;
}

.shared-chat-open-icon img { object-fit: contain; }

#ag-chat-widget-root.shared-chat-widget > .shared-chat-launcher > svg,
.shared-chat-icon .shared-chat-close,
.shared-chat-launcher.open .shared-chat-icon .shared-chat-open-icon { display: none; }

.shared-chat-launcher.open .shared-chat-icon .shared-chat-close { display: block; }

@media (prefers-reduced-motion: reduce) {
    #ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher,
    #tcChatFallback { transition: none; }
}

/* Status and launcher shown when the chat service is unavailable. */
#tcChatFallback,
#tcChatStatus {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 1000001;
}

#tcChatFallback { bottom: max(16px, env(safe-area-inset-bottom, 0px)); }

#tcChatStatus {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    width: min(320px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 14px;
    background: #191923;
    color: #f7f3ea;
    border: 1px solid #806330;
    border-radius: 14px;
    box-shadow: 0 8px 30px #0008;
}

#tcChatStatus p { margin: 0 0 10px; }
#tcChatStatus button {
    padding: 6px 10px;
    border: 1px solid #806330;
    border-radius: 8px;
    background: transparent;
    color: #ffe185;
    cursor: pointer;
}
#tcChatFallback[hidden],
#tcChatStatus[hidden],
#tcChatRetry[hidden] { display: none; }



#ag-chat-widget-root.shared-chat-widget,
#ag-chat-widget-root.shared-chat-widget .ag-chat-panel {
    pointer-events: none;
}

#ag-chat-widget-root.shared-chat-widget > button.ag-chat-launcher,
#ag-chat-widget-root.shared-chat-widget .ag-chat-panel.open,
#ag-chat-widget-root.shared-chat-widget .ag-chat-lightbox {
    pointer-events: auto;
}
