/* ========================================
   TOOLTIPS PARA EQUIPO DE TRABAJO
======================================= */

.team-tooltip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
    color: white;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    min-width: 320px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(calc(-100% - 10px));
    pointer-events: auto;
}

.tooltip-arrow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #0f172a;
}

.tooltip-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
    padding: 16px;
    text-align: center;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-content {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.tooltip-content::-webkit-scrollbar {
    width: 4px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 10px;
}

.tooltip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tooltip-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.tooltip-item i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.tooltip-item span {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Ocultar items vacíos */
.tooltip-item:has(span:empty) {
    display: none;
}

/* Loading state */
.team-tooltip.loading .tooltip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.tooltip-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #10B981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animación del badge de info */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

[data-tooltip-person] {
    /*animation: pulse 2s infinite;*/
}

/* Responsive */
@media (max-width: 768px) {
    .team-tooltip {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        transform: translateX(0) translateY(-100%);
    }
    
    .team-tooltip.show {
        transform: translateX(0) translateY(calc(-100% - 10px));
    }
    
    .tooltip-arrow {
        left: 50%;
    }
}
