/* Splash de carga F7ERP para el backoffice Blazor (diseno «Umbral D2» de Modern, 23-11).
   Medidas en unidades de diseno de SplashEscena.cs (840 x 525): 1 unidad = var(--u) = ancho de la tarjeta / 840 (container query).
   Todo con CSS; con prefers-reduced-motion queda estatico. Tambien estiliza #components-reconnect-modal. */
.f7s-overlay {
  --f7s-azul-a: #10609A; --f7s-azul-b: #0A5585; --f7s-azul-c: #063458;
  --f7s-marfil-a: #FCFBF6; --f7s-marfil-b: #F9F8F1;
  --f7s-crema: #FFFFFF; --f7s-sub: #D6E8F6;
  /* 1 unidad de diseno (SplashEscena 840 x 525) = el mayor tamano que cabe en el navegador */
  --u: min(calc(100vw / 840), calc(100vh / 525));
  position: fixed; inset: 0; z-index: 100000; margin: 0; padding: 0; overflow: hidden;
  background: var(--f7s-marfil-a);
  font-family: Bahnschrift, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  opacity: 1; transition: opacity .45s ease;
}
.f7s-overlay.f7s-fuera { opacity: 0; pointer-events: none; }
.f7s-overlay[hidden] { display: none; }
/* PANTALLA COMPLETA: dos paneles de borde a borde (55 % marfil / 45 % azul), sin tarjeta, fondo ni margen. */
.f7s-card { position: absolute; inset: 0; }
.f7s-escena { position: absolute; inset: 0; }
.f7s-izq { position: absolute; left: 0; top: 0; width: 55%; height: 100%;
  background: linear-gradient(180deg, var(--f7s-marfil-a), var(--f7s-marfil-b)); }
.f7s-der { position: absolute; right: 0; top: 0; width: 45%; height: 100%; overflow: hidden;
  background: linear-gradient(155deg, var(--f7s-azul-a) 0%, var(--f7s-azul-b) 45%, var(--f7s-azul-c) 100%); }
/* Lienzo de diseno centrado en cada panel: conserva las proporciones del splash de Modern (460 x 525 y 380 x 525 unidades). */
.f7s-lienzo { position: absolute; left: 50%; top: 50%; height: calc(var(--u) * 525); transform: translate(-50%, -50%); }
.f7s-izq .f7s-lienzo { width: calc(var(--u) * 460); }
.f7s-der .f7s-lienzo { width: calc(var(--u) * 380); }
/* Pantallas angostas (telefono): paneles apilados, 50 % de alto cada uno. */
@media (max-width: 700px) {
  .f7s-overlay { --u: min(calc(100vw / 460), calc(50vh / 525)); }
  .f7s-izq, .f7s-der { left: 0; right: 0; width: 100%; height: 50%; }
  .f7s-der { top: 50%; }
}

/* ---- panel marfil ---- */
.f7s-logo { position: absolute; left: calc(var(--u) * 25); top: calc(var(--u) * 96); width: calc(var(--u) * 410); height: calc(var(--u) * 190); }
.f7s-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.f7s-destello { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: var(--f7s-logo); mask-image: var(--f7s-logo);
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  background: linear-gradient(115deg, transparent 0 39%, rgba(255,255,255,.95) 50%, transparent 61% 100%) no-repeat;
  background-size: 300% 100%; background-position: 95% 0; animation: f7s-destello 3.5s ease-in-out 1.4s infinite; }
.f7s-wordmark-izq { position: absolute; left: calc(var(--u) * 25); top: calc(var(--u) * 96); width: calc(var(--u) * 410); height: calc(var(--u) * 190);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(var(--u) * 100); color: #1E3933; letter-spacing: .01em; }
.f7s-linea { position: absolute; left: calc(var(--u) * 40); width: calc(var(--u) * 380); top: calc(var(--u) * 385); height: 1px; background: #D5DDD3; }
.f7s-dev { position: absolute; left: calc(var(--u) * 40); top: calc(var(--u) * 440); transform: translateY(-50%);
  display: flex; align-items: center; gap: calc(var(--u) * 10); font-size: calc(var(--u) * 12); letter-spacing: .02em; color: #55625B; }
.f7s-dev img { height: calc(var(--u) * 30); width: auto; display: block; }

/* ---- panel azul (coordenadas relativas al panel: x - 460) ---- */
.f7s-luz { position: absolute; width: calc(var(--u) * 420); height: calc(var(--u) * 420); left: calc(var(--u) * -20); top: calc(var(--u) * 50);
  border-radius: 50%; background: radial-gradient(circle, #BFE0F7 0%, rgba(191,224,247,0) 68%); opacity: .13; animation: f7s-luz 21s ease-in-out infinite alternate; }
.f7s-titulo { position: absolute; left: calc(var(--u) * 40); top: calc(var(--u) * 165); font-size: calc(var(--u) * 68); line-height: 1; font-weight: 700; letter-spacing: .01em;
  color: var(--f7s-crema);
  background: linear-gradient(110deg, var(--f7s-crema) 0 40%, #A9D4F2 50%, var(--f7s-crema) 60% 100%) no-repeat, linear-gradient(var(--f7s-crema), var(--f7s-crema));
  background-size: 300% 100%, 100% 100%; background-position: 95% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: f7s-brillo 3.5s ease-in-out 1.6s infinite; }
.f7s-sub { max-width: calc(var(--u) * 300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: absolute; left: calc(var(--u) * 40); top: calc(var(--u) * 248); font-size: calc(var(--u) * 19); color: var(--f7s-sub); }
.f7s-modulo { position: absolute; left: calc(var(--u) * 40); top: calc(var(--u) * 282); max-width: calc(var(--u) * 300); font-size: min(calc(var(--u) * 32), calc(var(--u) * 28.5)); font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f7s-etapa { position: absolute; left: calc(var(--u) * 40); width: calc(var(--u) * 250); top: calc(var(--u) * 388); font-size: calc(var(--u) * 12); color: #EAF3FB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f7s-pct { position: absolute; right: calc(var(--u) * 40); top: calc(var(--u) * 388); font-size: calc(var(--u) * 12); color: #EAF3FB; font-variant-numeric: tabular-nums; }
.f7s-riel { position: absolute; left: calc(var(--u) * 40); width: calc(var(--u) * 300); top: calc(var(--u) * 412); height: max(2px, calc(var(--u) * 3.5)); border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.f7s-barra { height: 100%; width: calc(var(--p, 0) * 1%); background: #BFDDF3; border-radius: 3px; position: relative; overflow: hidden; transition: width .5s ease; }
.f7s-barra::after { content: ""; position: absolute; top: 0; bottom: 0; width: calc(var(--u) * 64); background: linear-gradient(90deg, transparent, #EAF5FD, transparent); animation: f7s-barra 1.6s linear infinite; }
.f7s-pie { position: absolute; left: calc(var(--u) * 40); top: calc(var(--u) * 488); transform: translateY(-100%); font-size: calc(var(--u) * 11); color: #D2E3F2; }
.f7s-ver { position: absolute; right: calc(var(--u) * 40); top: calc(var(--u) * 488); transform: translateY(-100%); font-size: calc(var(--u) * 12.5); color: #D2E3F2; font-variant-numeric: tabular-nums; }

/* El destello cruza en ~1 s dentro del ciclo de 3,5 s (inicio 1,4 s; el brillo del titulo sale 0,2 s despues de la mitad del ciclo). */
@keyframes f7s-destello { 0%, 40% { background-position: 95% 0; } 69%, 100% { background-position: 5% 0; } }
@keyframes f7s-brillo   { 0%, 45% { background-position: 95% 0, 0 0; } 76%, 100% { background-position: 5% 0, 0 0; } }
@keyframes f7s-barra    { from { left: calc(var(--u) * -64); } to { left: 100%; } }
@keyframes f7s-luz      { from { transform: translate(0, 0); } to { transform: translate(calc(var(--u) * 200), calc(var(--u) * 110)); } }

@media (prefers-reduced-motion: reduce) {
  .f7s-destello, .f7s-titulo, .f7s-barra::after, .f7s-luz { animation: none; }
  .f7s-titulo { background: none; -webkit-text-fill-color: #fff; }
  .f7s-destello { display: none; }
  .f7s-overlay, .f7s-barra { transition: none; }
}

/* ---- Reconexion: mismo lenguaje visual, un cuadro compacto sobre velo ---- */
#components-reconnect-modal { display: none; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  z-index: 100001; background: rgba(6, 52, 88, .55); backdrop-filter: blur(2px); align-items: center; justify-content: center;
  font-family: Bahnschrift, "Segoe UI", system-ui, sans-serif; }
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected,
#components-reconnect-modal.f7s-demo { display: flex; }
.f7s-rec { width: min(440px, 90vw); border-radius: 8px; overflow: hidden; border: 1px solid #5A7068; background: #FCFBF6; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: flex; }
.f7s-rec-marca { flex: 0 0 34%; background: linear-gradient(155deg, #10609A, #0A5585 50%, #063458); color: #fff; font-weight: 700; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.f7s-rec-cuerpo { flex: 1; padding: 20px 22px; color: #1E3933; }
.f7s-rec-titulo { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.f7s-rec-detalle { font-size: 12.5px; color: #55625B; margin: 0 0 14px; }
.f7s-rec-riel { height: 3.5px; border-radius: 3px; background: #D5DDD3; overflow: hidden; position: relative; }
.f7s-rec-riel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, #0A5585, transparent); animation: f7s-rec 1.4s linear infinite; }
@keyframes f7s-rec { from { left: -40%; } to { left: 100%; } }
.f7s-rec button { margin-top: 14px; border: 0; border-radius: 3px; background: #0A5585; color: #fff; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; display: none; }
#components-reconnect-modal.components-reconnect-failed .f7s-rec button,
#components-reconnect-modal.components-reconnect-rejected .f7s-rec button { display: inline-block; }
#components-reconnect-modal.components-reconnect-failed .f7s-rec-riel,
#components-reconnect-modal.components-reconnect-rejected .f7s-rec-riel { display: none; }
@media (prefers-reduced-motion: reduce) { .f7s-rec-riel::after { animation: none; width: 100%; opacity: .35; } }
