/* ==================== ADD FILES PANEL ==================== */

/* Add Files popup menu (appears above button) */
.add-files-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 50;
    min-width: 170px;
    overflow: hidden;
    animation: addFilesMenuIn 0.15s ease-out;
}

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

.add-files-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
    text-align: left;
}

.add-files-menu-item:hover {
    background: #f1f5f9;
}

.add-files-menu-item:first-child {
    border-bottom: 1px solid #f1f5f9;
}

/* ==================== TOOLKIT BUTTON & MENU ==================== */
/* Plus button and send button - compact circle style */
.toolkit-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

.toolkit-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Active state — rotates plus to X */
.toolkit-btn.active {
    background: #e2e8f0;
    transform: rotate(45deg);
}

/* Badge for active tool count */
.toolkit-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Send button */
.send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #1f2937;
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #000000;
}

/* Toolkit popup menu (opens upward from plus button) */
.toolkit-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    z-index: 50;
    min-width: 220px;
    overflow: hidden;
    animation: addFilesMenuIn 0.15s ease-out;
}

.toolkit-menu-section {
    padding: 4px 0;
}

.toolkit-menu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0;
}

.toolkit-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
    text-align: left;
}

.toolkit-menu-item:hover {
    background: #f8fafc;
}

.toolkit-menu-item .item-label {
    flex: 1;
}

.toolkit-menu-item .item-desc {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
}

.toolkit-menu-item .item-check {
    width: 14px;
    height: 14px;
    color: #64748b;
    flex-shrink: 0;
}

/* Disabled tool state in menu */
.toolkit-menu-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.toolkit-menu-item.disabled:hover {
    background: none;
}

/* Vault switcher */
.vault-switcher {
    position: relative;
}

.vault-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vault-switcher-btn:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.vault-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.vault-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.vault-dropdown-item:last-child {
    border-bottom: none;
}

.vault-dropdown-item:hover {
    background: #f8fafc;
}

.vault-dropdown-item.selected {
    background: #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

.vault-dropdown-item .vault-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
}

.vault-dropdown-item.selected .vault-icon {
    background: #334155;
    color: #ffffff;
}

/* Vault file card */
.vault-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.vault-file-card:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
}

.vault-file-card.selected {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.vault-file-card .file-type-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.vault-file-card .file-type-badge.pdf,
.vault-file-card .file-type-badge.doc,
.vault-file-card .file-type-badge.txt,
.vault-file-card .file-type-badge.default {
    background: #f1f5f9;
    color: #64748b;
}

/* Pagination loading dots */
@keyframes vaultDotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Add files footer */
.add-files-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.add-selected-btn {
    width: 100%;
    padding: 10px 16px;
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.add-selected-btn:hover {
    background: #1e293b;
}
