/* GO CHAT — dialog list on the left, styled like the Aigence workspace panel */

.go-chat-overlay.is-active .go-chat-dialogs {
    transform: translateX(0) scale(1);
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.05s;
}

.go-chat-dialogs__chrome {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.go-chat-dialogs.is-role-menu-open .go-chat-dialogs__chrome {
    display: none;
}

.go-chat-dialogs__actions {
    position: relative;
    z-index: 1;
    padding: 14px 16px 10px;
}

.go-chat-dialogs__new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    background: linear-gradient(90deg, rgba(208, 50, 175, 0.35), rgba(62, 93, 255, 0.35));
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.go-chat-dialogs__new:hover {
    background: linear-gradient(90deg, rgba(208, 50, 175, 0.55), rgba(62, 93, 255, 0.55));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 24px rgba(208, 50, 175, 0.3);
    transform: translateY(-1px);
}

.go-chat-dialogs__new-plus {
    font-size: 16px;
    line-height: 1;
}

.go-chat-dialogs__list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    list-style: none;
    margin: 0;
    padding: 4px 16px 16px;
}

.go-chat-dialogs__list::-webkit-scrollbar {
    width: 5px;
}

.go-chat-dialogs__list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--aigence-base, #D032AF), var(--aigence-primary, #3E5DFF));
    border-radius: 999px;
}

.go-chat-dialog {
    position: relative;
    margin: 0 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    background: linear-gradient(90deg, rgba(208, 50, 175, 0.2), rgba(62, 93, 255, 0.2));
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.go-chat-dialog:hover {
    background: linear-gradient(90deg, rgba(208, 50, 175, 0.3), rgba(62, 93, 255, 0.3));
    border-color: rgba(255, 255, 255, 0.22);
}

.go-chat-dialog.is-active {
    background: linear-gradient(90deg, rgba(208, 50, 175, 0.35), rgba(62, 93, 255, 0.35));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 22px rgba(208, 50, 175, 0.2);
}

.go-chat-dialog__open {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin: 0;
    padding: 11px 40px 11px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.go-chat-dialog__title {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.go-chat-dialog.is-active .go-chat-dialog__title {
    text-decoration: underline;
    text-decoration-color: #c084fc;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.go-chat-dialog__preview {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.go-chat-dialog__delete {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.go-chat-dialog:hover .go-chat-dialog__delete,
.go-chat-dialog.is-active .go-chat-dialog__delete,
.go-chat-dialog__delete:focus-visible {
    opacity: 1;
}

.go-chat-dialog__delete:hover {
    background: rgba(248, 113, 113, 0.3);
    border-color: rgba(248, 113, 113, 0.7);
    color: #fff;
}

.go-chat-dialogs__empty {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.5;
}

.go-chat-message__bubble.is-error {
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

.go-chat-typing-label {
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-style: italic;
}

.go-chat-message--typing span:nth-of-type(1) { animation-delay: 0s; }
.go-chat-message--typing span:nth-of-type(2) { animation-delay: 0.15s; }
.go-chat-message--typing span:nth-of-type(3) { animation-delay: 0.3s; }

@media (max-width: 767px) {
    .go-chat-overlay.is-active .go-chat-dialogs {
        transform: translateY(0) scale(1);
    }

    .go-chat-dialog__delete {
        opacity: 1;
    }
}
