/* =========================================================
   Sidebar / multi-chat UI styles.
   Kept in its own file so it never overwrites your customized
   assets/style.css — only structural rules needed to fit the
   new chat-list sidebar are here, no colors or fonts.
   ========================================================= */

.acb-shell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    min-height: 100vh;
    padding: 20px;
}

/* Let acb-shell own the centering/spacing instead of chat-container's own margin */
.chat-container { margin: 0 !important; }

.acb-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 16px;
    max-height: 680px;
    display: flex;
    flex-direction: column;
}

.acb-new-chat-btn {
    background: #2A2A2A;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px;
}
.acb-new-chat-btn:hover { background: #4338ca; }

.acb-chat-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.acb-chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
}
.acb-chat-item:hover { background: #f3f4f6; }
.acb-chat-item.acb-active { background: #eef0ff; color: #4f46e5; font-weight: 600; }

.acb-chat-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 6px;
}

.acb-chat-delete {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s ease;
    padding: 2px 4px;
}
.acb-chat-item:hover .acb-chat-delete { opacity: 1; }
.acb-chat-delete:hover { color: #dc2626; }

.acb-sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    background: #4f46e5;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}

/* --- Mobile: sidebar becomes an off-canvas drawer --- */
@media (max-width: 820px) {
    .acb-shell { padding: 0; }
    .acb-sidebar-toggle { display: flex; }
    .acb-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 999;
        width: 80vw;
        max-width: 300px;
    }
    .acb-sidebar.acb-open { transform: translateX(0); }
    .chat-container { width: 100vw; height: 100vh; border-radius: 0 !important; }
}

/* --- Embeddable widget: same off-canvas treatment regardless of width --- */
body.embed-mode .acb-shell { padding: 0; height: 100vh; }
body.embed-mode .acb-sidebar-toggle { display: flex; }
body.embed-mode .acb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 999;
    width: 80%;
    max-width: 280px;
}
body.embed-mode .acb-sidebar.acb-open { transform: translateX(0); }
