/* Info tooltip styling */
.info-tooltip {
    display: inline-block;
    background: #0088cc;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    position: relative;
    margin-left: 3px;
    vertical-align: middle;
}

.info-tooltip:hover {
    background: #006ba3;
}

/* Tooltip popup */
.info-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #333;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
    width: 320px;
    max-width: 90vw;
    font-size: 13px;
    line-height: 1.6;
    font-weight: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    white-space: normal;
    pointer-events: none;
}

/* Mũi tên tooltip */
.info-tooltip::after {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    pointer-events: none;
}

/* Hiển thị khi hover */
.info-tooltip:hover::before,
.info-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile: click để hiện */
.info-tooltip.active::before,
.info-tooltip.active::after {
    opacity: 1;
    visibility: visible;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .info-tooltip::before {
        width: 280px;
        font-size: 12px;
        padding: 10px 12px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .info-tooltip::after {
        left: auto;
        right: 10px;
        transform: none;
    }
}