/*
 * Login screen redesign: standard TYPO3 logo + intro text next to the login
 * card (see Resources/Private/Layouts/Login.html, forked from EXT:backend),
 * neutral dark background. Branding (logo/background/highlight color) is
 * configured in ext_localconf.php, loginFootnote stays as configured
 * elsewhere (e.g. config/system/settings.php).
 *
 * Layout is mobile first: intro stacked above the login card, side by side
 * from 62em upwards (intro 360px + gap + card 320px fits the 960px container).
 * EXT:backend ships the login screen without any media query, so every
 * responsive rule needed for the two column layout lives here.
 */
:root {
  --guidedtour-login-bg: #1a1b1e;
  --guidedtour-login-bg-alt: #232427;
}

@keyframes guidedtour-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes guidedtour-intro-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guidedtour-login {
  background: linear-gradient(160deg, var(--guidedtour-login-bg-alt) 0%, var(--guidedtour-login-bg) 60%);
}

.guidedtour-login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

.guidedtour-login-intro {
  width: 100%;
  max-width: 420px;
  color: #fff;
  animation: guidedtour-intro-in 0.5s ease-out;
}

.guidedtour-login-intro-logo {
  margin-bottom: 1.25rem;
}

.guidedtour-login-intro-logo img,
.guidedtour-login-intro-logo svg {
  height: clamp(32px, 7vw, 40px);
  width: auto;
  max-width: 100%;
}

.guidedtour-login-intro-title {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: #fff;
}

.guidedtour-login-intro-text {
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.guidedtour-login-intro .typo3-login-news {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

.guidedtour-login-intro .typo3-login-news-heading {
  color: #fff;
  font-weight: 600;
}

.guidedtour-login-intro .text-body-secondary {
  color: rgba(255, 255, 255, 0.6) !important;
}

.guidedtour-login-intro .typo3-login-carousel-control {
  color: #fff;
}

.guidedtour-login-help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  line-height: 1.6;
}

.guidedtour-login-help-question {
  color: rgba(255, 255, 255, 0.7);
  margin-right: 0.35em;
}

.guidedtour-login-help a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--guidedtour-accent, #ff8700);
  text-underline-offset: 2px;
}

.guidedtour-login-help a:hover {
  text-decoration-color: currentColor;
}

/* EXT:backend sets width: 100% and max-width: 320px here; the card has to be
  allowed to shrink below 320px so it never overflows narrow viewports. */
.guidedtour-login .typo3-login-wrap {
  flex: 0 1 auto;
  min-width: 0;
}

.card-login {
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: guidedtour-card-in 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .guidedtour-login-intro,
  .card-login {
    animation: none;
  }
}

.card-login .card-heading {
  min-height: 0;
  padding: 0;
}

.typo3-login-footnote {
  color: rgba(255, 255, 255, 0.6);
}

/* Not enough room next to the card: login-tour.js moves the tour bubble into
  the flow right above the card, so Shepherd's floating position is undone. */
.guidedtour-login-bubble-inline.shepherd-element {
  /* relative (not static): the mascot is positioned against the bubble.
    inset/transform undo the coordinates floating-ui writes inline. */
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  width: 100%;
  /* Top: room for the mascot poking out above the bubble, bottom: gap to card */
  margin: 2.5rem 0 1.25rem !important;
}

.guidedtour-login-bubble-inline .shepherd-arrow {
  display: none;
}

.guidedtour-login-bubble-inline .guidedtour-mascot {
  height: 64px;
  top: -56px;
}

/* Very narrow phones: the core card padding (2.5em each side) eats most of a
  320px viewport, so trim both the card and the container gutter. */
@media (max-width: 26em) {
  .typo3-login.guidedtour-login {
    --typo3-login-padding-x: 1.5em;
  }

  .guidedtour-login-container {
    gap: 1.5rem;
    padding: 1.25rem;
  }

  .guidedtour-login-intro-logo {
    margin-bottom: 1rem;
  }
}

/* Two column layout once intro (360px) + gap + card (320px) fit comfortably. */
@media (min-width: 62em) {
  .guidedtour-login-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .guidedtour-login-intro {
    flex: 1 1 360px;
  }

  .guidedtour-login-intro-logo {
    margin-bottom: 1.5rem;
  }

  .guidedtour-login-intro-title {
    margin-bottom: 1rem;
  }

  .guidedtour-login-intro .typo3-login-news,
  .guidedtour-login-help {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
}

/* EXT:backend pins the footnote to the bottom right corner, where it overlaps
  the card as soon as the viewport gets narrow or short. */
@media (max-width: 61.99em), (max-height: 46em) {
  .guidedtour-login .typo3-login-footnote {
    position: static;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5em 1.5em 1.5em;
    text-align: center;
  }
}
