/* One immediate, theme-independent surface for hover hints. */
#pakplan-tooltip {
    position: fixed; z-index: 2147483647; pointer-events: none;
    box-sizing: border-box; width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    max-height: calc(100vh - 16px); overflow: hidden;
    margin: 0; padding: 7px 10px; border: 0; border-radius: 8px;
    background: #000; color: #fff;
    font: 13px/1.4 Arial, sans-serif; text-align: center;
    white-space: pre-line; overflow-wrap: anywhere;
    box-shadow: 0 3px 12px #0002;
    transition: none; animation: none;
}
#pakplan-tooltip[hidden] { display: none; }

/* data-tooltip is now rendered by the delegated controller, not twice. */
html.pakplan-tooltips body [data-tooltip]::before,
html.pakplan-tooltips body [data-tooltip]::after,
html.pakplan-tooltips body .action-icon-btn[title]::before {
    content: none !important; display: none !important;
}

/* Keep rich calendar/task content and touch interactions in their owners. */
html body :is(.interval-hover-tooltip, .interval-drag-tooltip,
    .tasks-gantt-drag-tooltip, .task-comment-read-tooltip,
    .project-automation-toggle-tooltip, .custom-tooltip,
    .client-calendar-tooltip, .document-action-tooltip) {
    --color-text-primary: #fff; --color-text-secondary: #fff;
    --color-border-primary: #555; --automation-ink: #fff;
    background: #000 !important; color: #fff !important;
    border-color: #000 !important; border-radius: 8px;
    transition: none !important; animation: none !important;
}
html body :is(.interval-hover-tooltip, .tasks-gantt-drag-tooltip,
    .custom-tooltip, .project-automation-toggle-tooltip) :is(span, div, i, strong, small) {
    color: #fff !important;
}
html body .project-automation-toggle-tooltip::before {
    background: #000 !important; border-color: #000 !important;
}
html body .custom-tooltip::before, html body .custom-tooltip::after {
    border-top-color: #000 !important;
}
html body .task-comment-read-tooltip::before { border-bottom-color: #000; }
html body table#data-table th[data-column]:hover::before {
    background: #000; color: #fff; opacity: 1; transition: none; animation: none;
}
@media print {
    #pakplan-tooltip, .interval-hover-tooltip, .interval-drag-tooltip,
    .tasks-gantt-drag-tooltip, .task-comment-read-tooltip,
    .project-automation-toggle-tooltip, .custom-tooltip,
    .client-calendar-tooltip { display: none !important; }
}
