/** Employee Demo Chatbots Answer Controls Bridge v1.0.0 */

/* Remove the old global chip. The new tools live inside each assistant answer. */
.dc-chat-wrapper .dc-more-detail-chip,
.dc-chat-wrapper .dc-more-detail-chip.dc-hidden {
    display: none !important;
}
.dc-chat-wrapper .edc-kh-empty-suggestions {
    display: none !important;
}

/* Keep the original Listen control available, but remove the duplicate top Copy. */
.dc-chat-wrapper .dc-response-actions-top .dc-copy-response-btn {
    display: none !important;
}

.dc-chat-wrapper .dc-message-bubble {
    overflow: visible;
}

.dc-chat-wrapper .edc-kh-answer-tools {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid #e4e8f0;
    position: relative;
    z-index: 2;
}

.dc-chat-wrapper .edc-kh-tools-desktop,
.dc-chat-wrapper .edc-kh-tools-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.dc-chat-wrapper .edc-kh-tools-mobile {
    display: none;
}

.dc-chat-wrapper .edc-kh-answer-tool {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #d6ddea;
    border-radius: 999px;
    background: #fff;
    color: #34415a;
    font: inherit;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(30, 41, 59, .02);
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.dc-chat-wrapper .edc-kh-answer-tool:hover,
.dc-chat-wrapper .edc-kh-answer-tool:focus-visible {
    border-color: #7c5bd6;
    color: #643dbb;
    background: #faf8ff;
    outline: 3px solid rgba(124, 91, 214, .14);
    outline-offset: 1px;
}

.dc-chat-wrapper .edc-kh-answer-tool:active {
    transform: translateY(1px);
}

.dc-chat-wrapper .edc-kh-answer-tool-primary {
    color: #714410;
    border-color: #f2c35b;
    background: #fff8e8;
}

.dc-chat-wrapper .edc-kh-answer-tool-primary:hover,
.dc-chat-wrapper .edc-kh-answer-tool-primary:focus-visible {
    color: #fff;
    border-color: #8a5bc5;
    background: #8a5bc5;
}

.dc-chat-wrapper .edc-kh-answer-tool.edc-kh-flash {
    color: #fff;
    border-color: #16845a;
    background: #16845a;
}

.dc-chat-wrapper .edc-kh-mobile-more {
    position: relative;
    min-width: 42px;
}

.dc-chat-wrapper .edc-kh-mobile-more > summary {
    list-style: none;
}

.dc-chat-wrapper .edc-kh-mobile-more > summary::-webkit-details-marker {
    display: none;
}

.dc-chat-wrapper .edc-kh-answer-tool-icon {
    min-width: 42px;
    padding-inline: 10px;
    letter-spacing: 1px;
}

.dc-chat-wrapper .edc-kh-mobile-menu {
    position: absolute;
    z-index: 1000;
    right: 0;
    bottom: calc(100% + 9px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: min(310px, 82vw);
    padding: 9px;
    border: 1px solid #dce2ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(30, 41, 59, .20);
}

.dc-chat-wrapper .edc-kh-mobile-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #34415a;
    font: inherit;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.dc-chat-wrapper .edc-kh-mobile-menu button:hover,
.dc-chat-wrapper .edc-kh-mobile-menu button:focus-visible {
    border-color: #d9ccf2;
    background: #f6f2ff;
    color: #643dbb;
    outline: none;
}

.dc-chat-wrapper .edc-kh-action-request {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 700;
}

@media (max-width: 760px) {
    .dc-chat-wrapper .edc-kh-tools-desktop {
        display: none;
    }

    .dc-chat-wrapper .edc-kh-tools-mobile {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1fr) 42px;
        gap: 7px;
        width: 100%;
    }

    .dc-chat-wrapper .edc-kh-tools-mobile > .edc-kh-answer-tool,
    .dc-chat-wrapper .edc-kh-tools-mobile > details > .edc-kh-answer-tool {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 8px 9px;
        font-size: 10px;
        gap: 5px;
        overflow: hidden;
    }

    .dc-chat-wrapper .edc-kh-tools-mobile > .edc-kh-answer-tool span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 430px) {
    .dc-chat-wrapper .edc-kh-tools-mobile {
        grid-template-columns: minmax(0, 1.18fr) minmax(0, .7fr) minmax(0, .95fr) 38px;
        gap: 5px;
    }

    .dc-chat-wrapper .edc-kh-tools-mobile > .edc-kh-answer-tool,
    .dc-chat-wrapper .edc-kh-tools-mobile > details > .edc-kh-answer-tool {
        padding: 8px 5px;
        font-size: 9px;
    }

    .dc-chat-wrapper .edc-kh-answer-tool-icon,
    .dc-chat-wrapper .edc-kh-mobile-more {
        min-width: 38px;
    }

    .dc-chat-wrapper .edc-kh-mobile-menu {
        right: -2px;
        width: min(296px, 88vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-chat-wrapper .edc-kh-answer-tool {
        transition: none;
    }
}
