@import url("../../stayful/css/login.css?v=20261002-2");

:root {
  --auth-sand: #f7f3e9;
  --auth-ink: #16383b;
  --auth-muted: #50696b;
  --auth-line: #c5d5d3;
  --pf-v5-global--primary-color--100: var(--auth-green-strong);
  --pf-v5-global--primary-color--200: #0b633c;
}

html.login-pf,
body#keycloak-bg {
  background: var(--auth-sand);
}

.pf-v5-c-login {
  background: var(--auth-sand) url("../img/stayful-paper-landscape.webp") center / cover no-repeat;
}

.pf-v5-c-login__container {
  background: transparent;
}

.pf-v5-c-login__container {
  grid-template-columns: minmax(0, 53%) minmax(0, 47%);
  grid-template-areas: "header main";
  width: min(100%, 94rem);
  margin-inline: auto;
}

.pf-v5-c-login__header {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 1.5rem;
  padding: clamp(2rem, 5vw, 5rem);
  padding-block-start: clamp(8rem, 17vh, 11rem);
  padding-block-end: clamp(10rem, 21vh, 14rem);
  isolation: isolate;
  overflow: visible;
  background-color: transparent;
  background-image: none;
}

.pf-v5-c-login__header::before {
  content: "Schön, dass\A Sie da sind!";
  position: relative;
  inset: auto;
  order: 1;
  margin-block-start: clamp(2rem, 5vh, 4rem);
  max-width: 12ch;
  color: var(--auth-ink);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(3.25rem, 5vw, 5.1rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.035em;
  white-space: pre-line;
}

.pf-v5-c-login__header::after {
  content: "Ein Konto für alle freigegebenen Portale.";
  position: relative;
  z-index: 1;
  inset: auto;
  order: 2;
  display: block;
  margin-block-end: auto;
  max-width: 34ch;
  background: none;
  color: var(--auth-ink);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  pointer-events: none;
}

#kc-header-wrapper.pf-v5-c-brand {
  order: 0;
  width: clamp(25rem, 33vw, 30rem);
  height: clamp(5.5rem, 9vw, 8.25rem);
  background: url("../img/stayful-brand-color-20260922.svg") left center / contain no-repeat;
}

#login-select-toggle {
  width: 100%;
  min-width: 8.25rem;
  min-height: 2.75rem;
  padding-inline: 1rem 2.75rem;
  border: 1px solid rgba(8, 47, 70, 0.18);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.78);
  color: var(--auth-ink);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

#login-select-toggle:hover {
  border-color: var(--auth-green-strong);
  background-color: var(--auth-paper);
}

.pf-v5-c-login__main {
  width: min(36rem, calc(100% - 3rem));
  margin-block: 3rem;
  padding: clamp(2rem, 3.4vw, 3.1rem);
  border-radius: 1.5rem;
  box-shadow: 0 1.8rem 4rem -2.5rem rgba(35, 48, 43, 0.3);
}

html[lang="en"] .pf-v5-c-login__header::before {
  content: "Good to have\A you here!";
}

html[lang="it"] .pf-v5-c-login__header::before {
  content: "Che bello\A averti qui!";
}

html[lang="fr"] .pf-v5-c-login__header::before {
  content: "Bienvenue\A chez Stayful !";
}

html[lang="en"] .pf-v5-c-login__header::after {
  content: "One account for all approved portals.";
}

html[lang="it"] .pf-v5-c-login__header::after {
  content: "Un account per tutti i portali abilitati.";
}

html[lang="fr"] .pf-v5-c-login__header::after {
  content: "Un compte pour tous vos portails autorisés.";
}

.pf-v5-c-login__main:has(#kc-form-login)::before {
  content: none;
}

.pf-v5-c-login__main:has(#kc-form-login) .pf-v5-c-login__main-header::after {
  content: "Melden Sie sich mit Ihrem Stayful-Konto an.";
}

html[lang="en"] .pf-v5-c-login__main:has(#kc-form-login) .pf-v5-c-login__main-header::after {
  content: "Sign in with your Stayful account.";
}

html[lang="it"] .pf-v5-c-login__main:has(#kc-form-login) .pf-v5-c-login__main-header::after {
  content: "Accedi con il tuo account Stayful.";
}

html[lang="fr"] .pf-v5-c-login__main:has(#kc-form-login) .pf-v5-c-login__main-header::after {
  content: "Connectez-vous avec votre compte Stayful.";
}

.pf-v5-c-login__main-header {
  padding-block-end: 1.5rem;
}

.pf-v5-c-title.pf-m-3xl {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.pf-v5-c-login__main:has(#kc-register-form) {
  width: min(43rem, calc(100% - 4rem));
}

#kc-register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

#kc-register-form .pf-v5-c-form__group {
  min-width: 0;
}

.pf-v5-c-form__label-required {
  color: var(--auth-muted);
}

#kc-register-form .pf-v5-c-form__group:has(#email),
#kc-register-form .pf-v5-c-form__group:has(#password),
#kc-register-form .pf-v5-c-form__group:has(#password-confirm),
#kc-register-form .pf-v5-c-form__actions,
#kc-register-form #kc-form-buttons,
#kc-register-form .pf-v5-c-login__main-footer-band {
  grid-column: 1 / -1;
}

#kc-register-form .pf-v5-c-form__actions,
#kc-register-form #kc-form-buttons {
  margin-block-start: 0.35rem;
}

#kc-registration {
  margin-block-start: 0;
  padding-block-start: 0;
  border-block-start: 0;
  color: var(--auth-muted);
  line-height: 1.5;
  text-align: left;
}

#kc-registration > span {
  display: inline;
}

#kc-registration a {
  display: inline;
  min-height: 0;
  margin-inline-start: 0.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b633c;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 160ms ease-out;
}

#kc-registration a:hover {
  color: #075c37;
}

#kc-registration a:focus-visible {
  outline: 0.18rem solid var(--auth-focus);
  outline-offset: 0.18rem;
}

#kc-register-form[aria-busy="true"] input[type="submit"] {
  cursor: wait;
  background: #8ba89a;
  box-shadow: none;
  transform: none;
}

.stayful-expired {
  display: grid;
  gap: 1.5rem;
}

.stayful-expired__copy {
  max-width: 36rem;
  margin: 0;
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.stayful-expired__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.stayful-expired__actions .pf-v5-c-button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.stayful-expired__actions .pf-m-secondary {
  border: 1px solid var(--auth-line);
  background: var(--auth-paper);
  color: var(--auth-ink);
}

.stayful-expired__actions .pf-m-secondary:hover {
  border-color: var(--auth-green-strong);
  background: var(--auth-green-soft);
}

@media (min-width: 70.001rem) {
  .pf-v5-c-login__container {
    align-content: center;
    align-items: start;
    padding-block: 3rem;
  }

  .pf-v5-c-login__header {
    min-height: 0;
    padding-block: 0;
  }

  #kc-header-wrapper.pf-v5-c-brand {
    background-position: left top;
  }

  .pf-v5-c-login__main {
    align-self: start;
    margin-block: 0;
  }
}

@media (max-width: 70rem) {
  .pf-v5-c-login__container {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }

  .pf-v5-c-login__header {
    min-height: 0;
    gap: 1.25rem;
    padding: 6rem 1.5rem 1.4rem;
    background-image: none;
  }

  .pf-v5-c-login__header::before {
    display: block;
    margin-block-start: 0;
    max-width: 20ch;
    font-size: clamp(2.1rem, 4.5vw, 3rem);
  }

  .pf-v5-c-login__header::after {
    display: none;
  }

  #kc-header-wrapper.pf-v5-c-brand {
    width: min(26rem, calc(100vw - 3rem));
    height: 6rem;
  }

  .pf-v5-c-login__main {
    width: min(36rem, calc(100% - 2rem));
    margin: 1rem auto 10rem;
  }

  .pf-v5-c-login__main:has(#kc-register-form) {
    width: min(43rem, calc(100% - 2rem));
  }
}

@media (max-width: 40rem) {
  .pf-v5-c-login__header::before {
    font-size: clamp(2rem, 7vw, 2.5rem);
    line-height: 1.08;
  }

  #kc-header-wrapper.pf-v5-c-brand {
    width: min(20rem, calc(100vw - 3rem));
    height: 5.5rem;
  }

  .pf-v5-c-login__main {
    padding: 1.6rem 1.4rem;
  }

  .pf-v5-c-login__main:has(#kc-form-login)::before {
    top: 5.7rem;
    right: 1.5rem;
    width: 1rem;
    height: 1rem;
  }

  #kc-register-form {
    grid-template-columns: 1fr;
  }

  #kc-register-form .pf-v5-c-form__group,
  #kc-register-form .pf-v5-c-form__actions,
  #kc-register-form #kc-form-buttons {
    grid-column: 1;
  }

  .stayful-expired__actions {
    grid-template-columns: 1fr;
  }
}

.stayful-info__actions {
  margin-top: 1.5rem;
}

.stayful-info__actions .pf-v5-c-button {
  display: inline-flex;
  box-sizing: border-box;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
}

.stayful-legal-confirmation { margin-block: 1.5rem; font-size: .875rem; line-height: 1.6; }
.stayful-legal-label { display: flex; align-items: flex-start; gap: .75rem; min-height: 2.75rem; }
.stayful-legal-label input { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: .2rem; accent-color: #0f766e; }
.stayful-legal-confirmation a { text-decoration: underline; text-underline-offset: .2rem; }
.stayful-legal-confirmation input:focus-visible, .stayful-legal-confirmation a:focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; }
.stayful-legal-confirmation p { margin-block: .5rem; }
