/* PC 宽表长字段悬浮预览。提示层挂在 body 下，避免被表格滚动容器裁切。 */
.table-hover-tooltip {
    position: fixed;
    z-index: 10000;
    width: max-content;
    max-width: min(420px, calc(100vw - 32px));
    padding: 11px 13px;
    color: #fff;
    background: rgba(35, 39, 46, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 7px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .24);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
}

.table-hover-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.table-hover-tooltip::after {
    position: absolute;
    left: var(--tooltip-arrow-left, 50%);
    width: 10px;
    height: 10px;
    background: rgba(35, 39, 46, .96);
    content: "";
    transform: translateX(-50%) rotate(45deg);
}

.table-hover-tooltip[data-placement="top"]::after { bottom: -5px; }
.table-hover-tooltip[data-placement="bottom"]::after { top: -5px; }

[data-table-tooltip] { cursor: help; }
[data-table-tooltip]:focus-visible {
    outline: 2px solid rgba(54, 147, 239, .5);
    outline-offset: 2px;
    border-radius: 3px;
}

@media (max-width: 767px), (hover: none) {
    .table-hover-tooltip { display: none !important; }
    [data-table-tooltip] { cursor: inherit; }
}
