/* ==========================================================================
   SUN Liner Portal - sign-in screen.

   The legacy sign-in (sun_blazor_ref_files/loginscreen.png): a port photo
   behind a frosted card with an orange edge, the SUN Liner mark, two fields
   and one button. Plain HTML on purpose - the form posts to an endpoint that
   writes the cookie, so nothing here needs a circuit or DevExpress.

   The three port photographs cross-fade slowly behind the card.
   ========================================================================== */

.sl-login {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  overflow: hidden;
  background: var(--sl-blue-900);
}

.sl-login__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  animation: sl-login-fade 30s infinite;
}

.sl-login__bg--1 { background-image: url("../images/login-bg-1.jpg"); animation-delay: 0s; }
.sl-login__bg--2 { background-image: url("../images/login-bg-2.jpg"); animation-delay: 10s; }
.sl-login__bg--3 { background-image: url("../images/login-bg-3.jpg"); animation-delay: 20s; }

/* The violet wash of the legacy screen, in the brand blue and orange. */
.sl-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(15 58 92 / 55%) 0%, rgb(27 92 143 / 30%) 50%, rgb(224 118 27 / 30%) 100%);
  pointer-events: none;
}

@keyframes sl-login-fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; }
  100% { opacity: 0; }
}

.sl-login__card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 34px 38px 26px;
  border: 2px solid var(--sl-orange-400);
  border-radius: 26px;
  background: color-mix(in srgb, var(--sl-surface) 90%, transparent);
  box-shadow: var(--sl-shadow-2);
  backdrop-filter: blur(6px);
}

.sl-login__logo {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 22px;
}

/* The mark is dark blue and dark red: on a dark card it needs a light plate. */
[data-theme="dark"] .sl-login__logo {
  padding: 8px 12px;
  border-radius: var(--sl-radius);
  background: #FFFFFF;
}

.sl-login__form {
  display: grid;
  gap: 14px;
}

.sl-login__field {
  display: grid;
  gap: 6px;
}

.sl-login__label {
  color: var(--sl-ink-muted);
  font-size: 13px;
  font-weight: 600;
}

.sl-login__control {
  position: relative;
}

.sl-login__control .sl-i {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--sl-ink-subtle);
  font-size: 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

.sl-login__input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--sl-line);
  border-radius: var(--sl-radius);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: inherit;
  font-size: 14px;
  transition: border-color var(--sl-transition), box-shadow var(--sl-transition);
}

.sl-login__input:focus {
  border-color: var(--sl-blue-500);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sl-blue-500) 22%, transparent);
}

.sl-login__caps {
  display: none;
  color: var(--sl-warn);
  font-size: 12px;
}

.sl-login__caps.is-on {
  display: block;
}

/* Curved orange button with the sign-in icon - plain HTML, styled to match
   the DevExpress accent buttons inside the application. */
.sl-login__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: var(--sl-radius-pill);
  background: linear-gradient(180deg, var(--sl-orange-400) 0%, var(--sl-orange-500) 55%, var(--sl-orange-600) 100%);
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--sl-shadow-accent);
  transition: box-shadow var(--sl-transition), transform 80ms ease, filter var(--sl-transition);
}

.sl-login__submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgb(224 118 27 / 38%);
}

.sl-login__submit:active {
  transform: translateY(1px);
}

.sl-login__submit:focus-visible {
  outline: 2px solid var(--sl-blue-500);
  outline-offset: 3px;
}

.sl-login__submit:disabled {
  cursor: progress;
  filter: saturate(0.6);
}

.sl-login__submit .sl-i {
  font-size: 18px;
}

.sl-login__message {
  margin: 0 0 4px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--sl-stop) 30%, transparent);
  border-inline-start: 4px solid var(--sl-stop);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-stop-soft);
  color: var(--sl-stop);
  font-size: 13px;
}

.sl-login__message--ok {
  border-color: color-mix(in srgb, var(--sl-ok) 30%, transparent);
  border-inline-start-color: var(--sl-ok);
  background: var(--sl-ok-soft);
  color: var(--sl-ok);
}

.sl-login__footer {
  margin: 22px 0 0;
  color: var(--sl-ink-subtle);
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}

.sl-login__footer strong {
  color: var(--sl-ink-muted);
}

.sl-login__clock {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 1;
  color: rgb(255 255 255 / 85%);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .sl-login__bg { animation: none; }
  .sl-login__bg--2 { opacity: 1; }
}
