/* --- Tooltips (js/smTooltip.js) ----------------------------------------------
   One dark tip for every [data-tip] in the application: an optional bold heading,
   a body that keeps its line breaks, and an arrow at the thing it explains.
   Above popovers (1200) and dialogs (1400) so it is never hidden. */

/* A greyed-out button is where a tip matters most - it says why it cannot be pressed - but MudBlazor
   turns pointer events off on disabled buttons, so the tip never showed. The browser still refuses the
   click on a disabled button; only hovering comes back. */
.mud-button-root.mud-disabled[data-tip],
button[data-tip]:disabled {
    pointer-events: auto;
    cursor: default;
}

.sm-tip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    max-width: 300px;
    padding: 8px 11px;
    border-radius: 7px;
    background: #23232F;
    color: #FFFFFF;
    font-family: var(--mud-typography-default-family, Helvetica, Arial, sans-serif);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: .005em;
    text-align: left;
    box-shadow: 0 6px 18px rgba(17, 17, 34, .22), 0 1px 3px rgba(17, 17, 34, .18);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(2px);
    transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s linear .12s;
}

.sm-tip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s;
}

.sm-tip-title {
    margin-bottom: 2px;
    font-weight: 600;
    font-size: 12.5px;
}

.sm-tip-body {
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, .88);
}

.sm-tip-title[hidden] + .sm-tip-body {
    color: #FFFFFF;
}

.sm-tip-arrow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: inherit;
    transform: translate(-50%, -50%) rotate(45deg);
}

.sm-tip[data-side="top"] .sm-tip-arrow { top: 100%; }
.sm-tip[data-side="bottom"] .sm-tip-arrow { top: 0; }
.sm-tip[data-side="left"] .sm-tip-arrow { left: 100%; }
.sm-tip[data-side="right"] .sm-tip-arrow { left: 0; }

@media (prefers-reduced-motion: reduce) {
    .sm-tip,
    .sm-tip.is-visible {
        transition: none;
        transform: none;
    }
}
