/* /intranet/style.css */

html {
  height: 100%;
}

body {
  margin: 0;
}

/* ✅ Fondo animado usando variables CSS (con fallbacks) */
.bg {
  animation: slide var(--login-anim-d1, 3s) ease-in-out infinite alternate;
  background-image: linear-gradient(
    calc(var(--login-bg-angle, -60) * 1deg),
    var(--login-bg-c1, #6c3) calc(var(--login-bg-split, 50) * 1%),
    var(--login-bg-c2, #09f) calc(var(--login-bg-split, 50) * 1%)
  );
  bottom: 0;
  left: -50%;
  opacity: var(--login-bg-opacity, .5);
  position: fixed;
  right: -50%;
  top: 0;
  z-index: -1;
}

.bg2 {
  animation-direction: alternate-reverse;
  animation-duration: var(--login-anim-d2, 4s);
}

.bg3 {
  animation-duration: var(--login-anim-d3, 5s);
}

.content {
  background-color: rgba(255,255,255,.8);
  border-radius: .25em;
  box-shadow: 0 0 .25em rgba(0,0,0,.25);
  box-sizing: border-box;
  left: 50%;
  padding: 10vmin;
  position: fixed;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
}

h1 {
  font-family: monospace;
}

/* ✅ Animación con rango configurable */
@keyframes slide {
  0% { transform: translateX(calc(var(--login-anim-range, 25) * -1%)); }
  100% { transform: translateX(calc(var(--login-anim-range, 25) * 1%)); }
}

/* ✅ Si la animación está apagada */
body.login-anim-off .bg,
body.login-anim-off .bg2,
body.login-anim-off .bg3 {
  animation: none !important;
}
