/* ===== V3 Tooltip Styles ===== */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.tooltip svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tooltip:hover svg {
    opacity: 1;
}

.tooltip[data-tip]::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    color: white;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 500;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Tooltip arrow */
.tooltip[data-tip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1a1a1a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile: Show tooltips below on small screens */
@media (max-width: 768px) {
    .tooltip[data-tip]::before {
        bottom: auto;
        top: calc(100% + 8px);
        width: 200px;
    }

    .tooltip[data-tip]::after {
        bottom: auto;
        top: calc(100% + 2px);
        border-top: none;
        border-bottom: 6px solid #1a1a1a;
    }
}