/* GAFAI DMS — shared UI polish (toasts, confirm modal, loading, filters) */

/* Toast stack sits above content, flips side for RTL. */
.gafai-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    max-width: min(360px, calc(100vw - 2rem));
}
[dir="rtl"] .gafai-toast-stack { right: auto; left: 1rem; }

/* Inline spinner injected into submit buttons while a request is in flight. */
.gafai-spin {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: .4rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: gafai-spin .6s linear infinite;
}
[dir="rtl"] .gafai-spin { margin-right: 0; margin-left: .4rem; }
@keyframes gafai-spin { to { transform: rotate(360deg); } }

/* Sortable column headers on data tables. */
th.gafai-sort a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
th.gafai-sort a:hover { text-decoration: underline; }
th.gafai-sort .gafai-sort-ind { opacity: .4; font-size: .8em; }
th.gafai-sort .gafai-sort-ind.active { opacity: 1; }
