/* DigiMinds Hub - AI Assistant */

#dm-chat-launcher {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9998;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: #70d900;
    color: #071226;
    font-size: 29px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 30px #70d90055;
    transition: .25s;
}

#dm-chat-launcher:hover {
    transform: translateY(-4px) scale(1.04);
}

#dm-chat-window {
    padding: 0 !important;
    margin: 0 !important;
    position: fixed;
    right: 25px;
    bottom: 102px;
    z-index: 9999;
    width: 365px;
    max-width: calc(100vw - 30px);
    height: 520px;
    max-height: calc(100dvh - 130px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #071226;
    color: #fff;
    border: 1px solid #344765;
    border-radius: 17px;
    box-shadow: 0 20px 65px #0009;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

#dm-chat-window.dm-open {
    display: flex;
    animation: dmChatIn .22s ease;
}

@keyframes dmChatIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.dm-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    background: linear-gradient(110deg, #0755d9, #071226);
    border-bottom: 1px solid #344765;
}

.dm-chat-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.dm-chat-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #70d900;
    color: #071226;
    font-size: 20px;
    font-weight: 900;
}

.dm-chat-title {
    font-size: 14px;
    font-weight: 800;
}

.dm-chat-status {
    color: #b9f58c;
    font-size: 11px;
}

#dm-chat-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #ffffff18;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.dm-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 17px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background:
        radial-gradient(circle at top right, #0755d910, transparent 45%),
        #071226;
}

.dm-message {
    max-width: 88%;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.dm-message.bot {
    align-self: flex-start;
    color: #e5edf9;
    background: #14243d;
    border: 1px solid #293c59;
    border-bottom-left-radius: 3px;
}

.dm-message.user {
    align-self: flex-end;
    color: #071226;
    background: #70d900;
    border-bottom-right-radius: 3px;
}

.dm-chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 14px 12px;
    background: #071226;
}

.dm-chat-option {
    padding: 8px 11px;
    border: 1px solid #70d90080;
    border-radius: 20px;
    background: #70d90012;
    color: #baf47e;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.dm-chat-option:hover {
    background: #70d900;
    color: #071226;
}

.dm-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #293c59;
    background: #091426;
}

#dm-chat-input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #344765;
    border-radius: 8px;
    outline: none;
    background: #071226;
    color: white;
    font-size: 13px;
}

#dm-chat-input:focus {
    border-color: #70d900;
}

#dm-chat-send {
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 8px;
    background: #70d900;
    color: #071226;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
}

#dm-chat-send:disabled {
    opacity: .5;
    cursor: wait;
}

.dm-chat-footer {
    padding: 7px;
    text-align: center;
    background: #010817;
    color: #8da0ba;
    font-size: 10px;
}

@media(max-width:520px) {
    #dm-chat-launcher {
        right: 16px;
        bottom: 17px;
        width: 58px;
        height: 58px;
    }

    #dm-chat-window {
        right: 10px;
        bottom: 85px;
        width: calc(100vw - 20px);
        height: min(570px, calc(100dvh - 105px));
        max-height: calc(100dvh - 105px);
    }
}

@media(prefers-reduced-motion:reduce) {
    #dm-chat-window.dm-open {
        animation: none;
    }
}
