/* ==================== CHAT FILE CARD STYLES ==================== */
.chat-file-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 160px;
    max-width: 200px;
}

.chat-file-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.file-processing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 0;
}
.file-processing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
    animation: filePulse 1.2s ease-in-out infinite;
}
.file-processing-dot:nth-child(2) { animation-delay: 0.2s; }
.file-processing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes filePulse {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1); }
}

.file-icon {
    font-size: 20px;
    line-height: 1;
}

.remove-file-btn {
    padding: 4px;
    border-radius: 4px;
    color: #64748b;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ==================== ATTACHMENT CHIPS ROW ==================== */
/* Horizontally scrollable row of compact file/email chips below input */
.attachment-chips-row {
    display: flex;
    gap: 6px;
    padding: 6px 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.attachment-chips-row::-webkit-scrollbar {
    display: none;
}

.attach-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    flex-shrink: 0;
    max-width: 180px;
    cursor: default;
    transition: background 0.15s ease;
    position: relative;
}
.attach-chip:hover {
    background: #e2e8f0;
}

.attach-chip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    background: #e2e8f0;
}
.attach-chip-icon svg {
    width: 12px;
    height: 12px;
}

.attach-chip-name {
    font-size: 11px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.attach-chip-status {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.attach-chip-status.error {
    color: #ef4444;
}

.attach-chip-remove {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s ease;
}
.attach-chip-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}
.attach-chip-remove svg {
    width: 10px;
    height: 10px;
}

/* ==================== TOOL CHIPS ROW ==================== */
/* Selected tools shown as removable chips below input, matching attach-chip style */
.tool-chips-row {
    display: flex;
    gap: 6px;
    padding: 6px 0 2px;
    overflow-x: auto;
    flex-wrap: wrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tool-chips-row::-webkit-scrollbar {
    display: none;
}

.tool-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 6px;
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    flex-shrink: 0;
    cursor: default;
    transition: all 0.15s ease;
}
.tool-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.tool-chip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}
.tool-chip-icon svg {
    width: 13px;
    height: 13px;
}

.tool-chip-name {
    font-size: 11px;
    font-weight: 500;
    color: #1e40af;
    white-space: nowrap;
}

.tool-chip-remove {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #93c5fd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s ease;
    margin-left: 2px;
}
.tool-chip-remove:hover {
    background: #fecaca;
    color: #dc2626;
}
.tool-chip-remove svg {
    width: 10px;
    height: 10px;
}

/* ==================== TOOL STATUS CARD ==================== */
.tool-status-card {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.tool-status-spinner {
    width: 14px;
    height: 14px;
    background-image: url('/assets/lexi-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.fade-out {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ==================== TOOL SELECTOR BUTTONS ==================== */
.tool-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-selector-btn:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #f8fafc;
}

.tool-selector-btn.active {
    border-color: #1e293b;
    background: #1e293b;
    color: #ffffff;
}

.tool-selector-btn.active:hover {
    background: #334155;
    border-color: #334155;
}
