/*
 * Institution brand on the anonymous pages that do not go through DISPLAY_LOGIN
 * (login error, lost password, two-factor), see SeducLoginBranding::anonymousPageHooks().
 *
 * Loaded on every anonymous page; the login page itself is styled by seduc-login.css,
 * so every selector excludes it with :not(:has(.cc-seduc-login)). Same photo, card and
 * palette as the login page.
 */

.welcome-anonymous:not(:has(.cc-seduc-login)) {
  --cc-seduc-blue: #0b4f9c;
  --cc-seduc-blue-hover: #083c78;
  --cc-seduc-blue-deep: #0a2f5c;
  --cc-seduc-blue-rgb: 11, 79, 156;
  --cc-seduc-ink: #1f2d3d;
  --cc-seduc-muted: #5b6b7d;
  --cc-seduc-card-left: clamp(24px, 6vw, 140px);
  --cc-seduc-card-width: 420px;

  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  position: relative;
  background-color: #eef2f7;
}

.welcome-anonymous:not(:has(.cc-seduc-login))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #eef2f7;
  background-image: url("../pics/seduc-login-background.jpg");
  background-repeat: no-repeat;
  background-position: 60% center;
  background-size: cover;
}

.welcome-anonymous:not(:has(.cc-seduc-login))::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.12) 32%,
    rgba(255, 255, 255, 0) 60%
  );
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous {
  --tblr-primary: var(--cc-seduc-blue);
  --tblr-primary-rgb: var(--cc-seduc-blue-rgb);
  --tblr-primary-fg: #fff;

  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* The 60rem card (card_bg_width, two-factor setup) keeps its inline width; the 40rem lost-password card does not. */
.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight:not([style*="60rem"]) {
  width: min(var(--cc-seduc-card-width), calc(100% - 32px));
  max-width: var(--cc-seduc-card-width);
  margin-left: var(--cc-seduc-card-left);
  margin-right: auto;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight > .text-center:first-child {
  display: none;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .main-content-card {
  border: 0;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 14px 44px rgba(10, 47, 92, 0.2);
  overflow: visible;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .main-content-card > .card-body {
  padding: 2rem 1.85rem 1.75rem;
}

/* ===== Brand block (inserted by seduc-anonymous.js) ===== */
.welcome-anonymous:not(:has(.cc-seduc-login)) .cc-seduc-anon-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
  text-align: center;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .cc-seduc-anon-logo {
  display: block;
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 0.35rem;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .cc-seduc-anon-wordmark {
  display: block;
  margin: 0;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--cc-seduc-blue);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .cc-seduc-anon-agency {
  display: block;
  max-width: 360px;
  margin: 0.45rem auto 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cc-seduc-muted);
  text-wrap: balance;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .cc-seduc-anon-portal {
  display: block;
  width: 100%;
  margin: 0.9rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #e3e9f1;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cc-seduc-ink);
  text-wrap: balance;
}

/* ===== Message and actions ===== */
.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .alert {
  margin-bottom: 0;
  border-radius: 0.65rem;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .btn-primary {
  --tblr-btn-color: #fff;
  --tblr-btn-hover-color: #fff;
  --tblr-btn-active-color: #fff;
  --tblr-btn-bg: var(--cc-seduc-blue);
  --tblr-btn-border-color: var(--cc-seduc-blue);
  --tblr-btn-hover-bg: var(--cc-seduc-blue-hover);
  --tblr-btn-hover-border-color: var(--cc-seduc-blue-hover);
  --tblr-btn-active-bg: var(--cc-seduc-blue-deep);
  --tblr-btn-active-border-color: var(--cc-seduc-blue-deep);

  min-height: 2.6rem;
  border-radius: 0.55rem;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card a:not(.btn) {
  color: var(--cc-seduc-blue);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight > .text-center.text-muted {
  font-size: 0.68rem;
  color: #1a2332;
  opacity: 0.6;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}

/* Footer with a way back to the login (lost password) must stay readable over the photo. */
.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight > .text-center.text-muted:has(a) {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(10, 47, 92, 0.12);
  font-size: 0.8rem;
  color: var(--cc-seduc-ink);
  opacity: 1;
  text-shadow: none;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight > .text-center.text-muted a {
  color: var(--cc-seduc-blue);
  font-weight: 600;
}

/* ===== Lost password form ===== */
.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .card-title {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cc-seduc-ink);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card form > p.text-muted {
  margin-bottom: 1.1rem;
  font-size: 0.82rem;
  text-align: center;
  color: var(--cc-seduc-muted);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-field {
  margin-left: 0;
  margin-right: 0;
}

/* text-xxl-end is an !important utility; a flex label puts its text at the start regardless. */
.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-field > .col-form-label {
  display: flex;
  justify-content: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding-left: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cc-seduc-ink);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-field > .field-container {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-control {
  min-height: 2.6rem;
  border-radius: 0.55rem;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-control:focus {
  border-color: var(--cc-seduc-blue);
  box-shadow: 0 0 0 0.2rem rgba(var(--cc-seduc-blue-rgb), 0.18);
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-footer {
  margin-top: 1.25rem;
}

.welcome-anonymous:not(:has(.cc-seduc-login)) .main-content-card .form-footer .btn-primary {
  width: 100%;
  justify-content: center;
  gap: 0.4rem;
}

@media (max-width: 899.98px) {
  .welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .container-tight:not([style*="60rem"]) {
    margin-left: auto;
  }

  .welcome-anonymous:not(:has(.cc-seduc-login))::after {
    background: rgba(255, 255, 255, 0.15);
  }
}

@media (max-width: 575.98px) {
  .welcome-anonymous:not(:has(.cc-seduc-login)) .page-anonymous .main-content-card > .card-body {
    padding: 1.5rem 1.2rem 1.35rem;
  }
}
