/* ============================================
   ESTILOS PARA ELIMINAR CONVERSACIONES
   ============================================ */

.chat-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-item:hover {
    background: var(--bg-secondary);
}

.chat-item.active {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
}

.chat-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.delete-chat-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.chat-item:hover .delete-chat-btn {
    opacity: 0.6;
    transform: translateX(0);
}

.delete-chat-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    opacity: 1;
    transform: scale(1.05);
}

.delete-chat-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .delete-chat-btn {
        opacity: 1;
        transform: translateX(0);
        padding: 8px;
    }
    
    .chat-item-actions {
        gap: 4px;
    }
}

/* Animación para el modal de confirmación */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Estilos para el badge de mensajes no leídos */
.badge {
    background: var(--accent);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge.large {
    padding: 3px 10px;
    font-size: 0.8rem;
}

/* Ajustes para el layout del chat item */
.chat-item-info {
    flex: 1;
    min-width: 0; /* Para permitir que el texto se trunque */
    margin-right: 10px;
}

.chat-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover effects mejorados */
.chat-item:hover .chat-item-info h4 {
    color: var(--accent);
}

.chat-item.active .chat-item-info h4 {
    color: var(--accent);
    font-weight: 700;
}