/* Estilos para botones de chat en las tablas */

.chat-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.chat-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
}

.chat-button i {
    font-size: 0.9rem;
}

.unread-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #218888;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.unread-badge {
    background: #218888;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    margin-left: 5px;
}

.chat-cell {
    text-align: center;
    vertical-align: middle;
}

/* Animación para el contador de mensajes no leídos */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .chat-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-radius: 16px;
    }
    
    .unread-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -6px;
        right: -6px;
    }
    
    .chat-cell {
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .chat-button {
        padding: 4px 8px;
        font-size: 0.75rem;
        border-radius: 12px;
    }
    
    .chat-button i {
        font-size: 0.8rem;
    }
    
    .unread-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -5px;
        right: -5px;
    }
    
    .chat-cell {
        padding: 2px;
    }
}

/* Estados del botón */
.chat-button.has-unread {
    background: #20B2AA;
    color: white;
    border: 2px solid #1a9a92;
}

.chat-button.no-unread {
    background: #20B2AA;
    color: white;
    border: 2px solid #1a9a92;
}

.chat-button:hover {
    background: #1a9a92;
    color: white;
    border-color: #158a82;
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
}
