/**
 * Estilos para Usuários Clicáveis
 * Sistema unificado para links de perfil de usuário
 * 
 * @version 1.0.0
 * @author Sistema GoUs
 */

/* ===== ESTILOS PARA USUÁRIOS CLICÁVEIS ===== */

/* Base para todos os usuários clicáveis */
.user-profile-link {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    padding: 4px 6px !important;
    margin: -4px -6px !important;
    color: inherit !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Hover effects para usuários clicáveis - efeito discreto padrão */
.user-profile-link:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Responsável clicável - decoração discreta */
.task-responsible-clickable {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    padding: 4px 6px !important;
    margin: -4px -6px !important;
}

.task-responsible-clickable:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* P.O. - decoração discreta */
.po-profile-link:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Coordenador de Implantação - decoração discreta */
.tl-profile-link:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Criador - decoração discreta */
.creator-profile-link:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Usuários de comentários - decoração discreta */
.comment-profile-link:hover {
    background-color: rgba(108, 117, 125, 0.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Estilos para menções de usuários nos comentários */
.user-mention {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    margin: -2px -6px !important;
    color: #007bff !important;
    text-decoration: none !important;
    display: inline-flex !important;
}

.user-mention:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    color: #0056b3 !important;
    text-decoration: none !important;
}

.user-mention:active {
    transform: scale(0.98) !important;
}

/* Ajustes para o avatar quando clicável */
.task-responsible-clickable .avatar-sm,
.task-responsible-clickable img.rounded-circle,
.user-profile-link .avatar-sm,
.user-profile-link img.rounded-circle {
    transition: all 0.2s ease !important;
}

.task-responsible-clickable:hover .avatar-sm,
.task-responsible-clickable:hover img.rounded-circle,
.user-profile-link:hover .avatar-sm,
.user-profile-link:hover img.rounded-circle {
    transform: scale(1.05) !important;
}

/* Responsividade para menções */
@media (max-width: 768px) {
    .user-mention {
        font-size: 0.9rem !important;
    }
    
    .user-profile-link {
        padding: 2px 4px !important;
        margin: -2px -4px !important;
    }
}

/* Estados especiais */
.user-profile-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.user-profile-link:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Animações suaves */
@keyframes userProfilePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.user-profile-link.pulse {
    animation: userProfilePulse 0.6s ease-in-out;
}

/* Tooltips personalizados */
.user-profile-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.user-profile-link[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Estados de loading */
.user-profile-link.loading {
    opacity: 0.6;
    pointer-events: none;
}

.user-profile-link.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Indicadores visuais */
.user-profile-link.has-notifications::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
}

.user-profile-link.online::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

/* Variações de tema */
.user-profile-link.theme-primary:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    color: #007bff !important;
}

.user-profile-link.theme-success:hover {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.user-profile-link.theme-warning:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
    color: #ffc107 !important;
}

.user-profile-link.theme-danger:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .user-profile-link,
    .task-responsible-clickable,
    .user-mention {
        transition: none !important;
        animation: none !important;
    }
    
    .user-profile-link:hover {
        transform: none !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .user-profile-link:hover {
        background-color: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid #000 !important;
    }
    
    .user-mention:hover {
        background-color: rgba(0, 0, 255, 0.3) !important;
        border: 1px solid #0000ff !important;
    }
}
