/* ============================ Auth section ============================ */
.auth-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: #0a0a0a;
  padding: 0;
  box-sizing: border-box;
}

.user-logout-confirm {
  box-shadow: unset !important;
}
.user-logout-confirm .auth-section {
  min-height: 100vh;
  background: unset;
}

.user-logout-confirm .auth-card__title {
  font-size: 2rem;
  margin: unset;
}

.user-logout-confirm .form-actions {
  flex-direction: column !important;
}

.user-logout-confirm .dialog-cancel {
  border: 1px dashed black;
  padding: 10px;
  text-align: center;
}

/* ----------- Parent grid (4 cols x 5 rows, 8px gap) ----------- */
.auth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  height: 100vh;
  padding: 16px;
  box-sizing: border-box;
}

.auth-grid__form-side,
.auth-grid__slider-side {
  grid-column: span 2 / span 2;
  grid-row: span 5 / span 5;
}

/* Slider on left (cols 1–2), form on right (cols 3–4).
   Both starts are explicit so grid auto-placement never pushes the
   slider (DOM-second) to row 2 after the explicit form placement. */
.auth-grid__form-side {
  grid-column-start: 3;
  grid-row-start: 1;
}

.auth-grid__slider-side {
  grid-column-start: 1;
  grid-row-start: 1;
}

/* ============================ Left: form ============================ */
.auth-grid__form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 1rem;
  overflow: auto;
  box-shadow:
    0 -4px 24px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.12);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 40rem;
  height: 100%;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-content: space-between;
  /*
   * `safe` falls back to flex-start once content is taller than the card
   * (e.g. signup with a membership summary, on a short-viewport tablet) —
   * plain `center` has no such fallback and pushes the leading child (the
   * title) above the container's own top edge, into a region overflow:auto
   * on the ancestor can't scroll to. Still centers normally whenever
   * content fits, which is every other auth-card usage.
   */
  justify-content: safe center;
}

/* Neutralize the global form styles so .auth-card controls width/shadow. */
.auth-card__form form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.auth-card__brand {
  position: absolute;
  top: 20px;
  left: 0;
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Mobile-only brand logo — hidden on desktop where the slider shows the brand. */
.auth-card__mobile-logo {
  display: none;
}

.auth-card__mobile-logo img {
  height: 4.5rem;
  width: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.auth-card__logo {
  height: 3rem;
  width: auto;
  display: inline-block;
}

.auth-card__header {
  margin-bottom: 1.75rem;
}

.auth-card__title {
  font-family: "Bebas Neue", "Anton", sans-serif;
  font-size: 72px;
  font-weight: 400;
  color: #0a0a0a;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0 0 0.75rem;
}

.auth-card__subtitle {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.auth-card__form {
  margin-bottom: 1.5rem;
}

.auth-card__form .form-item {
  margin-bottom: 1.5rem;
}

.auth-card__form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #3a3a3a;
  margin-bottom: 0.5rem;
}

.auth-card__form .form-required::after,
.auth-card__form .required::after {
  content: " *";
  color: #e10128;
  font-weight: 700;
  margin-left: 0.15rem;
}

.auth-card__form .form-text,
.auth-card__form .form-email,
.auth-card__form .form-password,
.auth-card__form input[type="text"],
.auth-card__form input[type="email"],
.auth-card__form input[type="password"] {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  color: #0a0a0a;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  color-scheme: light;
}

.auth-card__form .form-text:focus,
.auth-card__form .form-email:focus,
.auth-card__form .form-password:focus,
.auth-card__form input[type="text"]:focus,
.auth-card__form input[type="email"]:focus,
.auth-card__form input[type="password"]:focus {
  outline: none;
  border-color: #e10128;
  box-shadow: 0 0 0 3px rgba(225, 1, 40, 0.15);
  background: #ffffff;
}

.auth-card__form .form-submit,
.auth-card__form button[type="submit"] {
  width: 100%;
  padding: 15px;
  background: #ea0029;
  color: #ffffff;
  border: none;
  border-radius: 11px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(234, 0, 41, 0.32);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-card__form .form-submit:hover,
.auth-card__form button[type="submit"]:hover {
  background: #c8001f;
  box-shadow: 0 4px 12px rgba(234, 0, 41, 0.22);
}

.auth-card__form .description {
  font-size: 13.5px;
  color: #6a6a6a;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.auth-card__form .error-message,
.auth-card__form .form-item__error-message {
  font-size: 13.5px;
  color: #e10128;
  font-weight: 600;
  margin-top: 0.5rem;
}

.auth-card__form .form-item--error input,
.auth-card__form .form-item--error textarea,
.auth-card__form .form-item--error select {
  border-color: #e10128;
  background: #fff1f2;
}

.auth-card__footer {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-card__link {
  font-size: 15px;
  color: #1e293b;
  font-weight: 700;
  text-decoration: none;
}

.auth-card__link:hover {
  text-decoration: underline;
}

/* ============================ First-login confirmation ============================ */
.first-login-confirmation {
  text-align: center;
  padding: 1.5rem 0;
}

.first-login-confirmation__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  margin-bottom: 1.25rem;
}

.first-login-confirmation__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.first-login-confirmation__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 0.75rem;
}

.first-login-confirmation__text {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

/* ============================ Logout confirm card ============================ */
.logout-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  max-width: 26rem;
  width: 100%;
  box-shadow:
    0 -4px 24px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ============================ Inline field header (label + forgot link) ============================ */
.auth-card__field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  gap: 1rem;
}

.auth-card__field-header label {
  margin-bottom: 0 !important;
}

.auth-card__forgot {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ea0029;
  text-decoration: none;
  white-space: nowrap;
}

.auth-card__forgot:hover {
  color: #c8001f;
  text-decoration: underline;
}

/* ============================ Register link ============================ */
.auth-card__register {
  font-size: 15px;
  color: #6a6a6a;
  margin-bottom: 30px;
  text-align: center;
}

.auth-card__register-link {
  font-weight: 700;
  color: #ea0029;
  text-decoration: none;
}

.auth-card__register-link:hover {
  text-decoration: underline;
}

/* ============================ Right: slider ============================ */
.auth-grid__slider-side {
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f0f0f;
}

.slider-images {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slider-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.1);
  transform-origin: center;
  will-change: transform, opacity;
  transition:
    opacity 1s ease,
    transform 1.4s ease;
}

.slider-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.35) 40%,
    rgba(10, 10, 10, 0.9) 100%
  );
  pointer-events: none;
}

.slider-title {
  position: absolute;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);
  width: 60%;
  color: #ffffff;
  z-index: 2;
}

.slider-title__text {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02rem;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
}

.slider-title__word {
  display: inline-block;
  will-change: transform, opacity;
  margin-right: 0.25rem;
  opacity: 0;
  transform: translateY(100%);
}

.slider-title__word.is-revealed {
  animation: slider-word-in 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

@keyframes slider-word-in {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.slider-indicator {
  position: absolute;
  top: auto;
  bottom: 44px;
  right: 44px;
  transform: none;
  z-index: 4;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  height: 96px;
  opacity: 0.85;
}

.slider-indices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.slider-indices__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.85rem;
}

.slider-indices__index {
  position: relative;
  width: 1.25rem;
  display: flex;
  justify-content: flex-end;
  opacity: 0.4;
  will-change: opacity;
}

.slider-indices__item.is-active .slider-indices__index {
  opacity: 1;
}

.slider-indices__marker {
  position: relative;
  width: 0.75rem;
  height: 1px;
  background-color: #ffffff;
  transform-origin: right;
  transform: scaleX(0);
  will-change: transform;
}

.slider-indices__item.is-active .slider-indices__marker {
  transform: scaleX(1);
}

.slider-progress-bar {
  position: relative;
  width: 1px;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.25);
}

.slider-progress {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  width: 3px;
  height: 100%;
  background-color: #ffffff;
  transform-origin: top;
  will-change: transform;
}

.slider-progress.is-running {
  animation: slider-progress-fill 5s linear forwards;
}

@keyframes slider-progress-fill {
  0% {
    transform: translateX(-50%) scaleY(0);
  }
  100% {
    transform: translateX(-50%) scaleY(1);
  }
}

/* Hidden — brand overlay replaces the JS-animated title */
.slider-title {
  display: none;
}

/* ============================ Slider brand overlay ============================ */
.auth-slider-brand {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  pointer-events: none;
}

.auth-slider-brand__top {
  pointer-events: auto;
}

.auth-slider-brand__logo {
  height: 56px;
  width: auto;
  display: block;
}

.auth-slider-brand__bottom {
  pointer-events: auto;
  max-width: 460px;
}

.auth-slider-brand__tagline {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ea0029;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.auth-slider-brand__headline {
  font-family: "Anton", sans-serif;
  font-size: clamp(4rem, 8.5vw, 128px);
  font-weight: 400;
  color: #ffffff;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

.auth-slider-brand__accent {
  color: #ea0029;
}

.auth-slider-brand__desc {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  color: #d0d0d0;
  line-height: 1.6;
  margin: 22px 0 0;
  max-width: 420px;
}

/* ============================ Slider indicators (subtle, corner-anchored) ============================ */

/* ============================ Reset confirmation form content ============================ */
.auth-card__form p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 0.6rem;
}

.auth-card__form em {
  font-style: normal;
  font-weight: 600;
  color: #0a0a0a;
}

/* ============================ Set-password page (post one-time login) ============================ */
.layout-container--set-password {
  background: #0a0a0a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.layout-container--set-password main {
  width: 100%;
}

.visually-hidden {
  height: 0 !important;
}

.set-password-card {
  background: #ffffff;
  border-radius: 1rem;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.set-password-card .auth-card__brand {
  display: none;
}

.set-password-card .auth-card__title {
  font-size: 2rem;
}

.set-password-card .auth-card__form {
  margin-bottom: unset;
}

.set-password-card__brand img {
  display: block;
  height: 2.5rem !important;
  width: auto !important;
  max-width: none;
  object-fit: contain;
}

.set-password-card .tabs--primary,
.set-password-card .local-tasks-block {
  display: none;
}

.set-password-card__header {
  margin-bottom: 1.75rem;
}

.set-password-card__title {
  font-size: 2rem;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 0.4rem;
}

.set-password-card__subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.set-password-card .page-title {
  display: none;
}

/* Neutralize any inner form wrapper Drupal adds so .set-password-card is the only box. */
.set-password-card form,
.set-password-card .block-system-main-block > div {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
  margin: 0;
  width: 100%;
}

.set-password-card .form-item {
  margin-bottom: 1.25rem;
}

.set-password-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.set-password-card .form-text,
.set-password-card .form-email,
.set-password-card .form-password,
.set-password-card input[type="text"],
.set-password-card input[type="email"],
.set-password-card input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: #0a0a0a;
  background: #f8fafc;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  color-scheme: light;
}

.set-password-card .form-text:focus,
.set-password-card .form-email:focus,
.set-password-card .form-password:focus,
.set-password-card input[type="text"]:focus,
.set-password-card input[type="email"]:focus,
.set-password-card input[type="password"]:focus {
  outline: none;
  border-color: #e10128;
  box-shadow: 0 0 0 3px rgba(225, 1, 40, 0.15);
  background: #ffffff;
}

.set-password-card .form-submit,
.set-password-card button[type="submit"] {
  padding: 0.8rem 2rem;
  background: #e10128;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.set-password-card .form-submit:hover,
.set-password-card button[type="submit"]:hover {
  background: #c51225;
}

.set-password-card .description {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.set-password-card .password-strength {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.set-password-card .password-strength__meter {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.set-password-card .password-strength__indicator {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.set-password-card .password-strength__title {
  font-size: 0.8rem;
  color: #64748b;
}

.set-password-card .password-strength__text {
  font-weight: 600;
  color: #0a0a0a;
}

.set-password-card .password-suggestions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.5;
}

.set-password-card .password-suggestions ul {
  margin: 0.35rem 0 0 1rem;
  padding: 0;
  list-style: disc;
}

.set-password-card .password-suggestions li {
  margin-bottom: 0.2rem;
}

.set-password-card .password-confirm-message {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: #64748b;
}

/* ============================ Responsive ============================ */
@media (max-width: 1536px) {
  .auth-card__title {
    font-size: 56px;
  }
}
@media (max-width: 1200px) {
  .auth-card__title {
    font-size: 48px;
    margin: 56px 0 0.5rem;
  }
}
@media (max-width: 1000px) {
  .auth-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    min-height: 100vh;
    padding: 16px;
    gap: 16px;
  }
  .auth-grid__form-side,
  .auth-grid__slider-side {
    grid-column: span 1 / span 1;
    grid-column-start: auto;
    grid-row: auto;
  }
  .auth-grid__slider-side {
    display: none;
  }
  .auth-card__mobile-logo {
    display: block;
  }
  .auth-card__title {
    font-size: 2.5rem;
    margin: 24px 0 0.5rem;
  }
  .slider-indicator {
    right: 1rem;
  }
}

/*
 * .auth-slider-brand__headline's clamp() scales off `vw` (full viewport
 * width) even though the slider only occupies the left half of the
 * two-column grid above 1000px — on a normal wide/short desktop monitor
 * that column is roomy enough to absorb the oversized text, but a short,
 * wide viewport (iPad landscape, 1024x768) has nowhere near enough vertical
 * room: the headline alone measured 87px/160px-tall for two lines, pushing
 * .auth-slider-brand__desc down into .slider-indicator's fixed
 * bottom-right position. None of the width-only breakpoints above this one
 * look at height at all, so this is the one that actually targets that case.
 *
 * Shrinking the font-size alone isn't enough: .auth-slider-brand__desc is a
 * block element that fills the column's full inner width regardless of
 * font-size, and its own max-width (460px) only ever engages on columns
 * wider than ~550px — below that, as here, the text runs the full width
 * and passes directly under .slider-indicator's fixed right-anchored
 * position, since both are positioned from the same padding edge. The
 * capped max-width below leaves room for the indicator; the font-size drop
 * is what makes that narrower column still read comfortably.
 */
@media (min-width: 1001px) and (max-height: 850px) {
  .auth-slider-brand__headline {
    font-size: clamp(2.5rem, 6vw, 56px);
    line-height: 1;
  }
  .auth-slider-brand__bottom {
    max-width: calc(100% - 80px);
  }
  .auth-slider-brand__desc {
    font-size: 14px;
    margin-top: 14px;
  }
}

/* ============================ Password toggle ============================ */
.password-toggle-wrapper {
  position: relative;
  width: 100%;
}

.auth-card__form .password-toggle-wrapper input[type="password"],
.auth-card__form .password-toggle-wrapper input[type="text"],
.set-password-card .password-toggle-wrapper input[type="password"],
.set-password-card .password-toggle-wrapper input[type="text"] {
  padding-right: 2.75rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #64748b;
  line-height: 0;
  border-radius: 0.25rem;
  transition: color 0.15s ease;
}

.password-toggle-btn:hover {
  color: #0a0a0a;
}

.password-toggle-btn:focus-visible {
  outline: 2px solid #e10128;
  outline-offset: 1px;
}
