/* Shared Matrix-style loading indicator. Keep loading surfaces free of cards. */
@keyframes tt-loader-spin { to { transform: rotate(1turn); } }

.tt-loader-icon,
:is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse) {
    position: relative;
    display: inline-block;
    font-family: 'Font Awesome 5 Duotone' !important;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    text-rendering: auto;
    animation: tt-loader-spin 2s linear infinite !important;
}
.tt-loader-icon::before,
:is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse)::before {
    position: absolute;
    left: 0;
    content: '\f3f4' !important;
    color: currentColor;
    opacity: 1;
}
.tt-loader-icon::after,
:is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse)::after {
    position: absolute;
    left: 0;
    content: '\10f3f4' !important;
    color: currentColor;
    opacity: .4;
}
.tt-loader-icon::before, .tt-loader-icon::after,
:is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse)::before,
:is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse)::after {
    top: 0;
    width: 1em;
    height: 1em;
    text-align: center;
}
.tt-loader-large { font-size: 48px; }
.tt-assignment-saving {
    position: relative;
    padding-inline-end: 1.5em;
}
.tt-assignment-saving::after {
    content: '';
    position: absolute;
    inset-inline-end: .35em;
    top: 50%;
    box-sizing: border-box;
    width: .9em;
    height: .9em;
    margin-top: -.45em;
    border: .13em solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: tt-loader-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .tt-assignment-saving::after { animation: none; }
}
.tt-loading-inline { display: flex; align-items: center; justify-content: center; min-height: 120px; margin: 0; padding: 24px; border: 0; border-radius: 0; box-shadow: none; background: rgba(255, 255, 255, .82); color: #1b3f8b; }
body.darkSide .tt-loading-inline, body.darkForm .tt-loading-inline { background: rgba(17, 22, 29, .84); color: #fff; }
.tt-loading-surface { display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 30px; color: #fff; }
body .modal-content:has(> .tt-loading-surface) { border: 0; border-radius: 0; background: transparent; box-shadow: none; }

/* Both DataTables generations, including tables inserted into panels. */
.dt-container, .dataTables_wrapper { position: relative; }
body :is(.dt-processing, .dataTables_processing) {
    position: absolute;
    inset: 0 !important;
    z-index: 10;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, .82) !important;
    color: #1b3f8b !important;
    font-size: 0 !important;
    pointer-events: none;
}
/* DataTables 2 always appends its own bouncing dots, even with custom text. */
body :is(.dt-processing, .dataTables_processing) > * { display: none !important; }

body :is(.dt-processing, .dataTables_processing)::before,
body :is(.dt-processing, .dataTables_processing)::after,
body .shift-loader::before,
body .shift-loader::after,
body #loader::before, body #loader::after,
.swal2-loader::before, .swal2-loader::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block !important;
    width: 1em;
    height: 1em;
    margin: -.5em 0 0 -.5em;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-family: 'Font Awesome 5 Duotone';
    font-style: normal;
    font-weight: 900;
    font-size: 36px;
    line-height: 1;
    text-align: center;
    animation: tt-loader-spin 2s linear infinite;
    content: '\f3f4';
    opacity: 1;
}
body :is(.dt-processing, .dataTables_processing)::after,
body .shift-loader::after,
body #loader::after, .swal2-loader::after { content: '\10f3f4'; opacity: .4; }
body.darkSide :is(.dt-processing, .dataTables_processing),
body.darkForm :is(.dt-processing, .dataTables_processing) {
    background: rgba(17, 22, 29, .84) !important;
    color: #fff !important;
}

/* Unbranded legacy loaders. The pulsing TT page/panel/portal logos stay intact. */
body .shift-loader::before,
body .shift-loader::after { font-size: 48px; }
body .shift-loader { background: rgba(255, 255, 255, .85); color: #1b3f8b; }
body.darkSide .shift-loader { background: rgba(17, 22, 29, .85); color: #fff; }
body #loader {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    background: none;
    border: 0;
    border-radius: 0;
    color: #fff;
    animation: none;
}

/* Framework refresh overlays and dialogs use the same open circular shape. */
body .block.block-opt-refresh::after {
    content: '\f3f4' !important;
    font-family: 'Font Awesome 5 Pro';
    font-weight: 900;
    font-size: 36px;
    color: #1b3f8b;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: tt-loader-spin 2s linear infinite;
}
body.darkSide .block.block-opt-refresh::after,
body.darkForm .block.block-opt-refresh::after { color: #fff; }
.swal2-loader { position: relative; width: 36px; height: 36px; border: 0 !important; border-radius: 0; box-shadow: none; background: none; color: #1b3f8b; animation: none !important; }
body.darkSide .swal2-loader, body.darkForm .swal2-loader { color: #fff; }

/* The mobile grid already uses this spinner; remove its small loading badge. */
body.tt-mobile #mobile-infinite-status.is-loading:not([hidden]) {
    top: 78px;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, .82);
    color: #1b3f8b;
    pointer-events: none;
}
body.tt-mobile #mobile-infinite-status.is-loading > i { font-size: 36px; }
body.tt-mobile.darkSide #mobile-infinite-status.is-loading:not([hidden]) { background: rgba(17, 22, 29, .84); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .tt-loader-icon,
    :is(.fa-spinner, .fa-spinner-third, .fa-circle-notch, .fa-circle-o-notch, .fa-sync-alt, .fa-refresh, .fa-cog):is(.fa-spin, .fa-pulse),
    body :is(.dt-processing, .dataTables_processing, .shift-loader, #loader)::before,
    body :is(.dt-processing, .dataTables_processing, .shift-loader, #loader)::after,
    body .block.block-opt-refresh::after, .swal2-loader::before, .swal2-loader::after { animation: none !important; }
}
