/**
 * Shared shell loaders: bootstrap (#mainloader), app shell, theme after-login, drip overlay.
 * Neutral slate spinner; semi-transparent scrim so page content stays visible.
 */

.shell-loader-overlay,
.boot-splash,
.app-shell-loader {
  width: 100% !important;
  height: 100% !important;
  position: fixed;
  inset: 0 !important;
  z-index: 9999;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.5) !important;
}

.shell-loader-card {
  width: max-content;
  max-width: 95%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.1);
}

.shell-loader-label,
.boot-splash__label,
.shell-loader-hint,
.boot-splash__hint {
  margin: 0;
  font-size: 14px;
  line-height: normal;
}

/* Logged-in content area (below header / beside aside); jQuery .show() uses display:block */
#mainloader_afterLogin.cube_fixed_bg.shell-loader-overlay {
  display: none;
}

.shell-loader-overlay .shell-loader-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Metronic in-app loader: hidden unless loading class on .ion-app */
.ion-app .m-page-loader.shell-loader-overlay {
  display: none;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.ion-app.m-page--loading-non-block .m-page-loader.shell-loader-overlay {
  display: flex;
}

html.hide-mainloader #mainloader {
  display: none !important;
}

.paused {
  background: rgba(0, 0, 0, 0.9);
  width: 100%;
  height: 100%;
  float: left;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  display: table;
  vertical-align: middle;
  bottom: 0;
}

p#log {
  text-align: center;
  color: #fff;
  display: table-cell;
  height: 100%;
  vertical-align: middle;
  font-size: var(--font-size--22px);
}

/* /proxy has no UI; avoid a second loader under the bootstrap overlay */
app-proxy-component .fixed_layer_loader {
  display: none !important;
}

.u-display-none {
  display: none !important;
}

/*
 * CSP migration: templates must not ship with static `show` on hidden dialogs.
 * Only treat as open when BS5 (or app code) sets aria-modal="true".
 */
.modal.show[aria-modal='true'],
.modal.showing[aria-modal='true'],
.modal.u-display-none.show[aria-modal='true'],
.modal.u-display-none.showing[aria-modal='true'],
.moreFilter_popup.show[aria-modal='true'][role='dialog'],
[role='dialog'].show[aria-modal='true']:has(> .modal-dialog),
.moreFilter_popup.show[aria-modal='true']:has(> .modal-dialog) {
  display: block !important;
  z-index: 1055 !important;
}

/* Stale `show` from CSP inline-style pass — keep off-screen until user opens via data-bs-toggle. */
.modal.show:not([aria-modal='true']),
.modal.showing:not([aria-modal='true']),
.moreFilter_popup.show:not([aria-modal='true']) {
  display: none !important;
}

/*
 * Static / admin popups must not close on outside click (BS5 mousedown on .modal shell).
 * Let clicks pass through the full-screen shell; only .modal-content stays interactive
 * (see style.bundle.css: .modal-dialog { pointer-events: none }).
 */
.modal.show[aria-modal='true'][data-bs-backdrop='static'],
.modal.show[aria-modal='true'].moreFilter_popup,
.modal.show[aria-modal='true'].TMS_Similer_Popup,
.modal.show[aria-modal='true'].admin-global-popup,
.modal.show[aria-modal='true'].feedback_form_popup {
  pointer-events: none;
}

/* Orphan backdrop when BS5 dispose did not run (global syncBootstrapModalChrome removes nodes too). */
body:not(.modal-open) .modal-backdrop {
  display: none !important;
  pointer-events: none !important;
}

.lds-spinner,
.lds-spinner div,
.lds-spinner div:after {
  box-sizing: border-box;
}
.lds-spinner {
  color: #212529;
  display: inline-block;
  position: relative;
  width: 30px;
  height: 30px;
}
.lds-spinner div {
  transform-origin: 15px 15px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 1px;
  left: 14px;
  width: 2px;
  height: 8px;
  border-radius: 20%;
  background: #212529;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media only screen and (max-width: 420px) {
  .shell-loader-card {
    padding: 8px 15px;
  }
}