/*
 * تسک ۰۵ (۱۴۰۵/۰۷/۳۰) — the light tooltip's one box (`agency-light-tooltip.js`).
 *
 * Drawn to read as Filament's own tooltip did: the same light and dark boxes
 * (tippy's `light` theme and its default dark one), the same 14px type, the
 * same 350px measure, Persian read from the right — the panel's existing rule
 * for tippy boxes (`agency-galleries.css`, GALLERY-TEMPLATE-LIST-505) — and an
 * arrow towards the cell.
 *
 * It is fixed to the window and moved with a transform, so standing it over
 * another cell lays out nothing but itself; it never takes the pointer, so it
 * can never cover the action beside the cell it explains.
 */
.agency-light-tip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    max-width: min(350px, calc(100vw - 16px));
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
    color: #26323d;
    background-color: #fff;
    box-shadow: 0 0 20px 4px #9aa1b126, 0 4px 80px -8px #24282f40, 0 4px 4px -2px #5b5e6926;
    /* Closed at once — a box fading out where it last stood, over a row the
       list has since scrolled away from, reads as one left behind. Only the
       opening fades in. */
    visibility: hidden;
    opacity: 0;
    transition: none;
    contain: layout style;
}

.agency-light-tip[data-open] {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.12s ease-out;
}

:where(.dark) .agency-light-tip {
    color: #fff;
    background-color: #333;
    box-shadow: none;
}

.agency-light-tip::after {
    content: '';
    position: absolute;
    left: var(--agency-tip-arrow, 50%);
    width: 0;
    height: 0;
    margin-left: -7px;
    border: 7px solid transparent;
}

.agency-light-tip[data-side='top']::after {
    top: 100%;
    border-bottom-width: 0;
    border-top-color: #fff;
}

.agency-light-tip[data-side='bottom']::after {
    bottom: 100%;
    border-top-width: 0;
    border-bottom-color: #fff;
}

:where(.dark) .agency-light-tip[data-side='top']::after {
    border-top-color: #333;
}

:where(.dark) .agency-light-tip[data-side='bottom']::after {
    border-bottom-color: #333;
}

@media (prefers-reduced-motion: reduce) {
    .agency-light-tip,
    .agency-light-tip[data-open] {
        transition: none;
    }
}
