﻿.ecc-ai-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1060;
    border: 0;
    border-radius: 999px;
    padding: .85rem 1.2rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    box-shadow: 0 15px 40px rgba(30, 64, 175, .30);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .ecc-ai-launcher:hover {
        transform: translateY(-3px);
        box-shadow: 0 20px 48px rgba(30, 64, 175, .38);
    }

.ecc-ai-window {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    width: 390px;
    height: 620px;
    max-height: calc(100vh - 7rem);
    z-index: 1061;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid rgba(128, 128, 128, .18);
    background: var(--si-body-bg, #fff);
    box-shadow: 0 25px 70px rgba(15, 23, 42, .22);
}

.ecc-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, #111827, #1e3a8a);
}

.ecc-ai-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

    .ecc-ai-brand strong,
    .ecc-ai-brand small {
        display: block;
    }

    .ecc-ai-brand small {
        opacity: .7;
        font-size: .72rem;
    }

.ecc-ai-avatar,
.ecc-ai-message-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
}

.ecc-ai-avatar {
    width: 40px;
    height: 40px;
}

.ecc-ai-message-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    font-size: .75rem;
}

.ecc-ai-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    padding: .25rem;
}

.ecc-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(148, 163, 184, .04);
}

.ecc-ai-message {
    display: flex;
    gap: .55rem;
    margin-bottom: 1rem;
}

.ecc-ai-message-user {
    justify-content: flex-end;
}

.ecc-ai-bubble {
    max-width: 82%;
    padding: .8rem .95rem;
    border-radius: .9rem;
    font-size: .9rem;
    line-height: 1.5;
    background: rgba(99, 102, 241, .08);
}

.ecc-ai-message-user .ecc-ai-bubble {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-bottom-right-radius: .25rem;
}

.ecc-ai-message-bot .ecc-ai-bubble {
    border-bottom-left-radius: .25rem;
}

.ecc-ai-quick-actions {
    padding: .75rem 1rem;
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    border-top: 1px solid rgba(128, 128, 128, .10);
}

    .ecc-ai-quick-actions button,
    .ecc-ai-consult {
        flex: 0 0 auto;
        border: 1px solid rgba(99, 102, 241, .22);
        border-radius: 999px;
        padding: .45rem .7rem;
        background: transparent;
        color: var(--si-body-color);
        font-size: .75rem;
        text-decoration: none;
    }

        .ecc-ai-quick-actions button:hover,
        .ecc-ai-consult:hover {
            color: #fff;
            border-color: #6366f1;
            background: #6366f1;
        }

.ecc-ai-typing {
    padding: .5rem 1rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    color: var(--si-gray-600);
    font-size: .75rem;
}

    .ecc-ai-typing span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #6366f1;
        animation: eccTyping 1.2s infinite ease-in-out;
    }

        .ecc-ai-typing span:nth-child(2) {
            animation-delay: .15s;
        }

        .ecc-ai-typing span:nth-child(3) {
            animation-delay: .30s;
        }

@keyframes eccTyping {
    0%, 80%, 100% {
        opacity: .3;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.ecc-ai-form {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    padding: .75rem 1rem;
    border-top: 1px solid rgba(128, 128, 128, .12);
    background: var(--si-body-bg);
}

    .ecc-ai-form textarea {
        flex: 1;
        min-height: 42px;
        max-height: 100px;
        resize: none;
        border: 1px solid rgba(128, 128, 128, .25);
        border-radius: .75rem;
        padding: .65rem .75rem;
        font: inherit;
        background: transparent;
        color: inherit;
    }

        .ecc-ai-form textarea:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
        }

    .ecc-ai-form button {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: .75rem;
        color: #fff;
        background: linear-gradient(135deg, #6366f1, #0ea5e9);
    }

.ecc-ai-disclaimer {
    padding: .45rem 1rem .65rem;
    text-align: center;
    color: var(--si-gray-600);
    font-size: .64rem;
}

@media (max-width: 575.98px) {
    .ecc-ai-window {
        right: .75rem;
        bottom: 5rem;
        width: calc(100vw - 1.5rem);
        height: calc(100vh - 6.5rem);
    }

    .ecc-ai-launcher {
        right: .75rem;
        bottom: .75rem;
    }
}
