/* Loader transversal SIEEJC v0.6.74: modal fullscreen con emblema animado */
.sieejc-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.10), rgba(255,255,255,0) 32rem),
    rgba(0, 0, 0, .52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.sieejc-loader-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.sieejc-loader-card {
  width: min(360px, calc(100vw - 2.5rem));
  min-height: 254px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.85rem 1.55rem 1.55rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .72);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,253,.96));
  color: #09264f;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34), 0 1px 0 rgba(255,255,255,.8) inset;
  transform: translateY(14px) scale(.96);
  opacity: 0;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.9,.2,1);
  text-align: center;
}
.sieejc-loader-overlay.is-visible .sieejc-loader-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.sieejc-loader-emblem {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: .12rem;
}
.sieejc-loader-orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 3px solid transparent;
  border-top-color: rgba(13, 47, 94, .78);
  border-right-color: rgba(47, 102, 178, .38);
  animation: sieejc-loader-orbit 1.15s linear infinite;
}
.sieejc-loader-orbit-b {
  inset: 9px;
  border-width: 2px;
  border-top-color: rgba(47, 102, 178, .76);
  border-left-color: rgba(13, 47, 94, .25);
  animation-duration: 1.55s;
  animation-direction: reverse;
}
.sieejc-loader-shield {
  position: relative;
  width: 48px;
  height: 58px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background: #e9eef7;
  clip-path: polygon(50% 0%, 91% 13%, 84% 66%, 50% 100%, 16% 66%, 9% 13%);
  box-shadow: 0 10px 28px rgba(13, 47, 94, .28);
}
.sieejc-loader-shield::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255,255,255,.75);
  clip-path: polygon(50% 0%, 91% 13%, 84% 66%, 50% 100%, 16% 66%, 9% 13%);
  z-index: 3;
}
.sieejc-loader-shield-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, #2f66b2, #0d2f5e);
  animation: sieejc-loader-shield-fill 1.55s ease-in-out infinite;
}
.sieejc-loader-shield-gloss {
  position: absolute;
  inset: -35% auto -35% -40%;
  width: 52%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transform: rotate(18deg);
  animation: sieejc-loader-shine 1.45s ease-in-out infinite;
  z-index: 4;
}
.sieejc-loader-shield-star {
  position: relative;
  z-index: 5;
  font-size: 1.2rem;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,.28);
  animation: sieejc-loader-star 1.1s ease-in-out infinite alternate;
}
.sieejc-loader-title {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: .01em;
  color: #0a2b57;
}
.sieejc-loader-text {
  min-height: 1.25rem;
  max-width: 280px;
  color: #4b607c;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.35;
}
.sieejc-loader-progress {
  position: relative;
  width: min(220px, 78vw);
  height: 10px;
  margin-top: .3rem;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(13, 47, 94, .16);
  background: rgba(13, 47, 94, .08);
}
.sieejc-loader-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d2f5e, #2f66b2, #6fa0ff);
  box-shadow: 0 0 14px rgba(47, 102, 178, .45);
  animation: sieejc-loader-progress 1.2s ease-in-out infinite;
}
.sieejc-btn-spinner {
  display: inline-block;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .48);
  border-top-color: #fff;
  animation: sieejc-loader-orbit .68s linear infinite;
  flex: 0 0 auto;
}
.sieejc-btn-loading,
button.sieejc-btn-loading,
.button.sieejc-btn-loading,
input[type="submit"].sieejc-btn-loading {
  cursor: wait !important;
  opacity: .88;
}
.sieejc-btn-loading .sieejc-btn-loading-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.sieejc-page-busy,
.sieejc-page-busy * {
  cursor: progress;
}
@keyframes sieejc-loader-orbit {
  to { transform: rotate(360deg); }
}
@keyframes sieejc-loader-shield-fill {
  0% { height: 18%; }
  45% { height: 78%; }
  72% { height: 100%; }
  100% { height: 24%; }
}
@keyframes sieejc-loader-shine {
  0% { transform: translateX(0) rotate(18deg); opacity: 0; }
  28% { opacity: .8; }
  78% { transform: translateX(260%) rotate(18deg); opacity: 0; }
  100% { transform: translateX(260%) rotate(18deg); opacity: 0; }
}
@keyframes sieejc-loader-star {
  from { transform: scale(.92); opacity: .82; }
  to { transform: scale(1.08); opacity: 1; }
}
@keyframes sieejc-loader-progress {
  0% { transform: translateX(-105%); width: 38%; }
  48% { width: 58%; }
  100% { transform: translateX(270%); width: 38%; }
}
@media (max-width: 640px) {
  .sieejc-loader-card {
    width: min(330px, calc(100vw - 2rem));
    border-radius: 22px;
    padding: 1.55rem 1.2rem 1.35rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  /* Movimiento más lento y discreto, pero nunca congelado: el usuario conserva
     una indicación inequívoca de que el proceso continúa. */
  .sieejc-loader-orbit,
  .sieejc-loader-shield-fill,
  .sieejc-loader-shield-gloss,
  .sieejc-loader-shield-star,
  .sieejc-loader-progress span,
  .sieejc-btn-spinner {
    animation-duration: 2.4s !important;
    animation-iteration-count: infinite !important;
  }
  .sieejc-loader-orbit { animation-duration: 2.8s !important; }
  .sieejc-loader-progress span { animation-duration: 2s !important; }
  .sieejc-btn-spinner { animation-duration: 1.2s !important; }
}
