.custom-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--background-color-blank, #fff);
    color: var(--text-color, #1a1f2c);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--border-color, #d9dde4);
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--background-color-blank, #fff);
    border: 1px solid var(--border-color, #d9dde4);
    transform: rotate(45deg);
    z-index: -1;
}

/* Top tooltip (default) */
.custom-tooltip::before {
    bottom: -5px;
    left: var(--arrow-x, 50%);
    margin-left: -4px;
    border-top: none;
    border-left: none;
}

/* Bottom tooltip */
.custom-tooltip-bottom::before {
    top: -5px;
    bottom: auto;
    border-bottom: none;
    border-right: none;
}

.custom-tooltip-wide {
    max-width: min(320px, calc(100vw - 16px));
    white-space: pre-line;
}

.custom-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}
