/*
 * Fire Sword Studios login theme for Keycloak 26 (keycloak.v2 / PatternFly 5).
 * Loaded after keycloak.v2's styles.css. Only brand tokens, layout and the
 * decorative backdrop live here; page markup stays upstream.
 */

html.fss-theme {
  --fss-red: #d34c54;
  --fss-coral: #f15b42;
  /* #d34c54 with white text is 4.3:1; the button fill is 10% deeper for WCAG AA (5.1:1). */
  --fss-button: #be444c;
  --fss-button-hover: #a93b43;
  --fss-link: #f28b90;
  --fss-link-hover: #ffc0c3;
  --fss-bg-top: #1d0c0f;
  --fss-bg-mid: #2a1216;
  --fss-bg-bottom: #3b171b;
  --fss-card: rgba(27, 13, 16, 0.84);
  --fss-field: #140a0c;
  --fss-line: rgba(255, 255, 255, 0.14);
  --fss-line-soft: rgba(255, 255, 255, 0.08);
  --fss-text: #f5eaea;
  --fss-text-soft: #d3bcbd;
  --fss-label: #ead8d8;
  --fss-danger: #e8686f;
  --fss-danger-text: #ff9aa0;
  --fss-ring: rgba(211, 76, 84, 0.3);
  --fss-ember-hot: #ffe2ad;
  --fss-ember-warm: #ffb070;
  --fss-ember-red: #ff7a66;
  --fss-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fss-font-display: "Chakra Petch", "Figtree", system-ui, sans-serif;

  /* PatternFly 5 dark tokens, re-pointed at the brand palette. */
  --pf-v5-global--FontFamily--text: var(--fss-font-body);
  --pf-v5-global--FontFamily--text--vf: var(--fss-font-body);
  --pf-v5-global--FontFamily--heading: var(--fss-font-display);
  --pf-v5-global--FontFamily--heading--vf: var(--fss-font-display);
  --pf-v5-global--primary-color--100: var(--fss-button);
  --pf-v5-global--primary-color--200: var(--fss-button-hover);
  --pf-v5-global--active-color--100: var(--fss-red);
  --pf-v5-global--link--Color: var(--fss-link);
  --pf-v5-global--link--Color--hover: var(--fss-link-hover);
  --pf-v5-global--link--Color--visited: var(--fss-link);
  --pf-v5-global--link--Color--light: var(--fss-link);
  --pf-v5-global--link--Color--light--hover: var(--fss-link-hover);
  --pf-v5-global--Color--100: var(--fss-text);
  --pf-v5-global--Color--200: var(--fss-text-soft);
  --pf-v5-global--Color--light-100: var(--fss-text);
  --pf-v5-global--BackgroundColor--100: var(--fss-field);
  --pf-v5-global--BackgroundColor--200: var(--fss-bg-top);
  --pf-v5-global--BorderColor--100: var(--fss-line);
  --pf-v5-global--BorderColor--200: var(--fss-line);
  --pf-v5-global--BorderColor--300: var(--fss-line);
  --pf-v5-global--danger-color--100: var(--fss-danger);
  --pf-v5-global--danger-color--200: var(--fss-danger-text);
  --pf-v5-global--icon--Color--light: var(--fss-text-soft);
  --pf-v5-global--BorderRadius--sm: 10px;

  color-scheme: dark;
  background-color: var(--fss-bg-bottom);
}

/* keycloak.v2 paints a full-page Keycloak illustration on the body. */
.login-pf.fss-theme body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--fss-bg-top) 0%, var(--fss-bg-mid) 55%, var(--fss-bg-bottom) 100%) fixed;
  color: var(--fss-text);
  font-family: var(--fss-font-body);
}

/* ---------- Animated backdrop ---------- */

.fss-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.fss-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  animation: fss-drift 26s ease-in-out infinite alternate;
}

.fss-blob--forge {
  left: 50%;
  bottom: -300px;
  width: min(940px, 150vw);
  height: 560px;
  margin-left: max(-470px, -75vw);
  background: var(--fss-red);
  animation: fss-drift 24s ease-in-out infinite alternate, fss-flicker 4.6s ease-in-out infinite;
}

.fss-blob--left {
  left: -180px;
  top: 16%;
  width: 620px;
  height: 560px;
  background: #8e2433;
  opacity: 0.45;
  animation-duration: 33s;
  animation-delay: -11s;
}

.fss-blob--right {
  right: -140px;
  top: -160px;
  width: 580px;
  height: 480px;
  background: var(--fss-coral);
  opacity: 0.14;
  animation-duration: 21s;
  animation-delay: -5s;
}

.fss-mark {
  position: absolute;
  left: -110px;
  bottom: -170px;
  width: 640px;
  height: 764px;
  background: url("../img/fs-mark.svg") center / contain no-repeat;
  opacity: 0.075;
  animation: fss-float 18s ease-in-out infinite alternate;
}

.fss-glint {
  position: absolute;
  top: -30%;
  left: -40%;
  width: 220px;
  height: 160%;
  background: linear-gradient(90deg, rgba(255, 200, 180, 0) 0%, rgba(255, 190, 170, 0.05) 40%,
    rgba(255, 236, 224, 0.2) 50%, rgba(255, 190, 170, 0.05) 60%, rgba(255, 200, 180, 0) 100%);
  transform: rotate(24deg);
  mix-blend-mode: screen;
  animation: fss-glint 13s cubic-bezier(0.55, 0.1, 0.35, 1) infinite;
}

.fss-embers {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

.fss-embers span {
  position: absolute;
  bottom: -16px;
  border-radius: 50%;
  opacity: 0;
  background: var(--fss-ember, var(--fss-ember-warm));
  box-shadow: 0 0 6px 2px rgba(255, 130, 70, 0.72), 0 0 16px 5px rgba(211, 76, 84, 0.32);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.fss-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(12, 4, 6, 0.5) 100%);
}

@keyframes fss-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -30px) scale(1.08); }
  100% { transform: translate(-40px, 24px) scale(0.95); }
}

@keyframes fss-flicker {
  0%, 100% { opacity: 0.4; }
  18% { opacity: 0.5; }
  34% { opacity: 0.43; }
  52% { opacity: 0.56; }
  70% { opacity: 0.45; }
  86% { opacity: 0.52; }
}

@keyframes fss-float {
  0% { transform: translateY(0) rotate(-7deg); }
  100% { transform: translateY(-24px) rotate(-3deg); }
}

@keyframes fss-glint {
  0% { left: -40%; opacity: 0; }
  4% { opacity: 1; }
  24% { left: 120%; opacity: 1; }
  26%, 100% { left: 120%; opacity: 0; }
}

@keyframes fss-rise-a {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  8% { opacity: 1; }
  35% { transform: translate(28px, -34vh) scale(0.95); }
  65% { transform: translate(-10px, -64vh) scale(0.8); opacity: 0.85; }
  100% { transform: translate(46px, -104vh) scale(0.35); opacity: 0; }
}

@keyframes fss-rise-b {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  8% { opacity: 1; }
  35% { transform: translate(-34px, -33vh) scale(0.9); }
  65% { transform: translate(12px, -65vh) scale(0.75); opacity: 0.8; }
  100% { transform: translate(-58px, -104vh) scale(0.3); opacity: 0; }
}

@keyframes fss-rise-c {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  35% { transform: translate(12px, -35vh) scale(1); }
  65% { transform: translate(52px, -63vh) scale(0.85); opacity: 0.9; }
  100% { transform: translate(18px, -104vh) scale(0.4); opacity: 0; }
}

/* Generated once from a fixed seed; positions, sizes and timings of the 28 embers. */
.fss-embers span:nth-child(1) { left: 32.7%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 11.6s; animation-delay: -0.6s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(2) { left: 36.8%; width: 2px; height: 2px; animation-name: fss-rise-a; animation-duration: 16.2s; animation-delay: -3.5s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(3) { left: 42.0%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 8.8s; animation-delay: -3.7s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(4) { left: 93.9%; width: 2px; height: 2px; animation-name: fss-rise-a; animation-duration: 13.2s; animation-delay: -5.2s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(5) { left: 55.6%; width: 3px; height: 3px; animation-name: fss-rise-a; animation-duration: 10.6s; animation-delay: -1.5s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(6) { left: 55.9%; width: 3px; height: 3px; animation-name: fss-rise-a; animation-duration: 8.9s; animation-delay: -5.1s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(7) { left: 10.5%; width: 2px; height: 2px; animation-name: fss-rise-b; animation-duration: 13.1s; animation-delay: -8.1s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(8) { left: 77.2%; width: 5px; height: 5px; animation-name: fss-rise-b; animation-duration: 13.3s; animation-delay: -6.0s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(9) { left: 78.8%; width: 3px; height: 3px; animation-name: fss-rise-b; animation-duration: 8.7s; animation-delay: -2.6s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(10) { left: 72.5%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 13.5s; animation-delay: -1.0s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(11) { left: 17.2%; width: 4px; height: 4px; animation-name: fss-rise-a; animation-duration: 9.4s; animation-delay: -4.6s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(12) { left: 75.9%; width: 4px; height: 4px; animation-name: fss-rise-b; animation-duration: 11.1s; animation-delay: -3.9s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(13) { left: 7.7%; width: 2px; height: 2px; animation-name: fss-rise-c; animation-duration: 16.5s; animation-delay: -7.8s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(14) { left: 6.9%; width: 3px; height: 3px; animation-name: fss-rise-b; animation-duration: 13.8s; animation-delay: -13.7s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(15) { left: 71.2%; width: 4px; height: 4px; animation-name: fss-rise-a; animation-duration: 8.2s; animation-delay: -3.8s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(16) { left: 49.4%; width: 3px; height: 3px; animation-name: fss-rise-a; animation-duration: 14.9s; animation-delay: -1.9s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(17) { left: 39.3%; width: 5px; height: 5px; animation-name: fss-rise-c; animation-duration: 8.7s; animation-delay: -3.9s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(18) { left: 87.6%; width: 4px; height: 4px; animation-name: fss-rise-b; animation-duration: 15.8s; animation-delay: -4.4s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(19) { left: 67.9%; width: 4px; height: 4px; animation-name: fss-rise-a; animation-duration: 16.6s; animation-delay: -2.5s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(20) { left: 23.7%; width: 3px; height: 3px; animation-name: fss-rise-a; animation-duration: 8.1s; animation-delay: -6.7s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(21) { left: 28.6%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 11.8s; animation-delay: -4.4s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(22) { left: 94.4%; width: 2px; height: 2px; animation-name: fss-rise-c; animation-duration: 12.1s; animation-delay: -10.5s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(23) { left: 40.0%; width: 4px; height: 4px; animation-name: fss-rise-a; animation-duration: 8.9s; animation-delay: -5.6s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(24) { left: 7.6%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 12.0s; animation-delay: -1.3s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(25) { left: 11.0%; width: 3px; height: 3px; animation-name: fss-rise-c; animation-duration: 12.8s; animation-delay: -12.1s; --fss-ember: var(--fss-ember-hot); }
.fss-embers span:nth-child(26) { left: 7.9%; width: 3px; height: 3px; animation-name: fss-rise-b; animation-duration: 13.5s; animation-delay: -2.0s; --fss-ember: var(--fss-ember-warm); }
.fss-embers span:nth-child(27) { left: 60.0%; width: 5px; height: 5px; animation-name: fss-rise-b; animation-duration: 9.1s; animation-delay: -7.7s; --fss-ember: var(--fss-ember-red); }
.fss-embers span:nth-child(28) { left: 48.4%; width: 2px; height: 2px; animation-name: fss-rise-c; animation-duration: 9.3s; animation-delay: -7.0s; --fss-ember: var(--fss-ember-warm); }

@media (prefers-reduced-motion: reduce) {
  .fss-backdrop *,
  .fss-edge::after {
    animation: none !important;
  }

  .fss-embers,
  .fss-glint {
    display: none;
  }
}

/* ---------- Page layout ---------- */

.fss-theme .pf-v5-c-login {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 88px 16px 40px;
}

.fss-theme .pf-v5-c-login__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 440px;
  padding: 0;
}

.fss-theme .pf-v5-c-login__header {
  margin: 0;
  padding: 0;
}

.fss-theme #kc-header-wrapper {
  margin: 0;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.fss-logo {
  display: block;
  width: 280px;
  max-width: 72vw;
  height: auto;
  animation: fss-logo-glow 5s ease-in-out infinite;
}

@keyframes fss-logo-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(241, 91, 66, 0.28)); }
  50% { filter: drop-shadow(0 0 26px rgba(241, 91, 66, 0.5)); }
}

/* The card. */
.fss-theme .pf-v5-c-login__main {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 16px;
  background: var(--fss-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px rgba(8, 2, 4, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  --pf-v5-c-login__main-header--PaddingTop: 40px;
  --pf-v5-c-login__main-header--PaddingRight: 40px;
  --pf-v5-c-login__main-header--PaddingLeft: 40px;
  --pf-v5-c-login__main-header--md--PaddingRight: 40px;
  --pf-v5-c-login__main-header--md--PaddingLeft: 40px;
  --pf-v5-c-login__main-header--PaddingBottom: 24px;
  --pf-v5-c-login__main-body--PaddingRight: 40px;
  --pf-v5-c-login__main-body--PaddingLeft: 40px;
  --pf-v5-c-login__main-body--md--PaddingRight: 40px;
  --pf-v5-c-login__main-body--md--PaddingLeft: 40px;
  --pf-v5-c-login__main-body--PaddingBottom: 32px;
  --pf-v5-c-login__main-footer--PaddingBottom: 0;
}

/* A thin blade edge with a light running along it. */
.fss-theme .pf-v5-c-login__main > .fss-edge {
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  padding: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fss-red);
}

.fss-edge::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 240, 230, 0), #fff3ea, rgba(255, 240, 230, 0));
  animation: fss-edge 5.5s ease-in-out infinite;
}

@keyframes fss-edge {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(420%); }
}

.fss-theme .pf-v5-c-login__main-header {
  border-top: 0;
  grid-template-columns: 100%;
}

.fss-theme #kc-page-title {
  margin: 0;
  font-family: var(--fss-font-display);
  font-size: 26px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff4f2;
  text-align: center;
}

.fss-theme .pf-v5-c-login__main-body {
  font-size: 15px;
}

.fss-theme .pf-v5-c-form {
  --pf-v5-c-form--GridGap: 20px;
}

.fss-theme .pf-v5-c-form__label,
.fss-theme .pf-v5-c-form__label-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--fss-label);
}

.fss-theme .pf-v5-c-form__label-required {
  color: var(--fss-danger-text);
}

.fss-theme .subtitle {
  color: var(--fss-text-soft);
  font-size: 13px;
}

/* ---------- Fields ---------- */

.fss-theme .pf-v5-c-form-control {
  --pf-v5-c-form-control--BackgroundColor: transparent;
  --pf-v5-c-form-control--Color: #fbf1f1;
  --pf-v5-c-form-control--FontSize: 16px;
  --pf-v5-c-form-control--PaddingLeft: 16px;
  --pf-v5-c-form-control--PaddingRight: 16px;
  --pf-v5-c-form-control__icon--m-status--Color: var(--fss-danger);
  --pf-v5-c-form-control--m-error__icon--m-status--Color: var(--fss-danger);
  --pf-v5-c-form-control--m-readonly--BackgroundColor: transparent;
  min-height: 48px;
}

.fss-theme .pf-v5-c-form-control::before,
.fss-theme .pf-v5-c-form-control::after {
  border-width: 0;
}

/* A single field box: a plain input, or an input group (password + eye toggle). */
.fss-theme .pf-v5-c-login__main .pf-v5-c-form-control:not(.pf-v5-c-input-group .pf-v5-c-form-control),
.fss-theme .pf-v5-c-login__main .pf-v5-c-input-group {
  box-sizing: border-box;
  border: 1px solid var(--fss-line);
  border-radius: 10px;
  background: var(--fss-field);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-form-control:not(.pf-v5-c-input-group .pf-v5-c-form-control):focus-within,
.fss-theme .pf-v5-c-login__main .pf-v5-c-input-group:focus-within {
  border-color: var(--fss-red);
  box-shadow: 0 0 0 3px var(--fss-ring);
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-form-control.pf-m-error:not(.pf-v5-c-input-group .pf-v5-c-form-control),
.fss-theme .pf-v5-c-login__main .pf-v5-c-input-group:has(.pf-m-error) {
  border-color: var(--fss-danger);
}

.fss-theme .pf-v5-c-form-control > :is(input, select, textarea):focus {
  outline: none;
}

.fss-theme .pf-v5-c-form-control.pf-m-readonly > input {
  color: var(--fss-text-soft);
}

.fss-theme .pf-v5-c-input-group__item .pf-v5-c-button.pf-m-control {
  --pf-v5-c-button--m-control--BackgroundColor: transparent;
  --pf-v5-c-button--m-control--Color: #c9adae;
  --pf-v5-c-button--m-control--hover--Color: #ffffff;
  --pf-v5-c-button--m-control--focus--Color: #ffffff;
  --pf-v5-c-button--m-control--after--BorderTopColor: transparent;
  --pf-v5-c-button--m-control--after--BorderRightColor: transparent;
  --pf-v5-c-button--m-control--after--BorderBottomColor: transparent;
  --pf-v5-c-button--m-control--after--BorderLeftColor: transparent;
  --pf-v5-c-button--m-control--hover--after--BorderBottomColor: transparent;
  --pf-v5-c-button--m-control--focus--after--BorderBottomColor: transparent;
  --pf-v5-c-button--m-control--active--after--BorderBottomColor: transparent;
  min-width: 46px;
  border-radius: 0 9px 9px 0;
}

.fss-theme .pf-v5-c-input-group .pf-v5-c-button.pf-m-control::after,
.fss-theme .pf-v5-c-login__main .pf-v5-c-input-group__item {
  border: 0;
}

.fss-theme .pf-v5-c-input-group__item .pf-v5-c-button.pf-m-control:focus-visible {
  outline: 2px solid var(--fss-link);
  outline-offset: -4px;
}

/* Remember me / Forgot password row and field help text. */
.fss-theme .pf-v5-c-helper-text {
  --pf-v5-c-helper-text--FontSize: 14px;
  --pf-v5-c-helper-text__item-text--Color: var(--fss-text-soft);
  --pf-v5-c-helper-text__item-text--m-error--Color: var(--fss-danger-text);
  --pf-v5-c-helper-text__item-icon--m-error--Color: var(--fss-danger-text);
  align-items: center;
  gap: 12px;
}

.fss-theme .pf-v5-c-form__helper-text {
  margin-top: 4px;
}

.fss-theme .pf-v5-c-check {
  --pf-v5-c-check__label--Color: #e3cfd0;
  --pf-v5-c-check__label--FontSize: 14px;
}

/* keycloak.v2 nests the label inside a second .pf-v5-c-check. */
.fss-theme .pf-v5-c-check > label.pf-v5-c-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}

.fss-theme .pf-v5-c-check__input {
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: center;
  transform: none;
  accent-color: var(--fss-red);
}

.fss-theme label.pf-v5-c-check .pf-v5-c-check__label {
  margin: 0;
}

/* ---------- Buttons ---------- */

.fss-theme .pf-v5-c-button {
  --pf-v5-c-button--BorderRadius: 10px;
  --pf-v5-c-button--after--BorderRadius: 10px;
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--fss-button);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--fss-button-hover);
  --pf-v5-c-button--m-primary--focus--BackgroundColor: var(--fss-button-hover);
  --pf-v5-c-button--m-primary--active--BackgroundColor: var(--fss-button-hover);
  --pf-v5-c-button--m-primary--Color: #ffffff;
  --pf-v5-c-button--m-primary--hover--Color: #ffffff;
  --pf-v5-c-button--m-primary--focus--Color: #ffffff;
  --pf-v5-c-button--m-primary--active--Color: #ffffff;
  min-height: 52px;
  font-family: var(--fss-font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(211, 76, 84, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-button.pf-m-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(211, 76, 84, 0.45);
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-button.pf-m-secondary {
  --pf-v5-c-button--m-secondary--Color: var(--fss-text);
  --pf-v5-c-button--m-secondary--hover--Color: #ffffff;
  --pf-v5-c-button--m-secondary--focus--Color: #ffffff;
  --pf-v5-c-button--m-secondary--after--BorderColor: rgba(255, 255, 255, 0.22);
  --pf-v5-c-button--m-secondary--hover--after--BorderColor: var(--fss-red);
  --pf-v5-c-button--m-secondary--focus--after--BorderColor: var(--fss-red);
  --pf-v5-c-button--m-secondary--active--after--BorderColor: var(--fss-red);
  min-height: 48px;
  font-weight: 600;
}

.fss-theme .pf-v5-c-login__main .pf-v5-c-button.pf-m-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fss-theme .pf-v5-c-button:focus-visible {
  outline: 2px solid var(--fss-link);
  outline-offset: 2px;
}

.fss-theme .pf-v5-c-form__actions {
  gap: 12px;
}

/* ---------- Alerts ---------- */

.fss-theme .pf-v5-c-alert.pf-m-inline {
  --pf-v5-c-alert--BoxShadow: none;
  --pf-v5-c-alert__title--FontWeight: 500;
  --pf-v5-c-alert__FontSize: 14px;
  border: 1px solid var(--fss-alert-border, var(--fss-line));
  border-radius: 10px;
  --pf-v5-c-alert--BorderTopWidth: 0;
}

.fss-theme .pf-v5-c-alert.pf-m-inline.pf-m-danger {
  --pf-v5-c-alert--m-inline--m-danger--BackgroundColor: rgba(211, 76, 84, 0.16);
  --pf-v5-c-alert--m-danger__icon--Color: var(--fss-danger-text);
  --pf-v5-c-alert--m-danger__title--Color: #ffe1e2;
  --fss-alert-border: rgba(232, 104, 111, 0.55);
}

.fss-theme .pf-v5-c-alert.pf-m-inline.pf-m-warning {
  --pf-v5-c-alert--m-inline--m-warning--BackgroundColor: rgba(240, 171, 0, 0.12);
  --pf-v5-c-alert--m-warning__icon--Color: #f4c145;
  --pf-v5-c-alert--m-warning__title--Color: #ffe7b0;
  --fss-alert-border: rgba(244, 193, 69, 0.45);
}

.fss-theme .pf-v5-c-alert.pf-m-inline.pf-m-success {
  --pf-v5-c-alert--m-inline--m-success--BackgroundColor: rgba(91, 163, 82, 0.14);
  --pf-v5-c-alert--m-success__icon--Color: #8fd18a;
  --pf-v5-c-alert--m-success__title--Color: #d9f5d6;
  --fss-alert-border: rgba(143, 209, 138, 0.45);
}

.fss-theme .pf-v5-c-alert.pf-m-inline.pf-m-info {
  --pf-v5-c-alert--m-inline--m-info--BackgroundColor: rgba(255, 255, 255, 0.06);
  --pf-v5-c-alert--m-info__icon--Color: var(--fss-link);
  --pf-v5-c-alert--m-info__title--Color: var(--fss-text);
  --fss-alert-border: var(--fss-line);
}

/* ---------- Info band, instructions and links ---------- */

.fss-theme .pf-v5-c-login__main-footer-band {
  margin-top: 24px;
  padding: 20px 0 0;
  border-top: 1px solid var(--fss-line-soft);
  background: none;
  text-align: center;
  font-size: 14px;
  color: var(--fss-text-soft);
}

.fss-theme #kc-registration a,
.fss-theme #kc-form-options a {
  font-weight: 600;
}

.fss-theme .instruction,
.fss-theme #kc-error-message p,
.fss-theme #kc-info-message p {
  color: var(--fss-text);
  font-size: 15px;
  line-height: 1.5;
}

.fss-theme #kc-error-message,
.fss-theme #kc-info-message {
  text-align: center;
}

.fss-theme a {
  color: var(--fss-link);
}

.fss-theme a:hover {
  color: var(--fss-link-hover);
}

.fss-theme .pf-v5-c-login__main-footer-helper-text,
.fss-theme .pf-v5-u-color-200 {
  color: var(--fss-text-soft) !important;
}

/* ---------- Language menu ---------- */

.fss-locale {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 2;
}

.fss-locale .pf-v5-c-form-control {
  width: auto;
  grid-template-columns: auto;
  min-height: 44px;
  border: 1px solid var(--fss-line);
  border-radius: 999px;
  background: rgba(20, 8, 10, 0.45) url("../img/globe.svg") 14px center / 18px 18px no-repeat;
}

.fss-locale .pf-v5-c-form-control:hover {
  background-color: rgba(40, 16, 20, 0.7);
}

.fss-locale .pf-v5-c-form-control:focus-within {
  border-color: var(--fss-red);
  box-shadow: 0 0 0 3px var(--fss-ring);
}

.fss-locale select {
  width: auto;
  field-sizing: content;
  min-height: 42px;
  padding: 0 38px 0 40px;
  border: 0;
  background: transparent url("../img/chevron-down.svg") right 14px center / 16px 16px no-repeat;
  color: #f1e2e2;
  font-family: var(--fss-font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.fss-locale select option {
  background: var(--fss-bg-mid);
  color: var(--fss-text);
}

/* ---------- Footer ---------- */

.fss-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  padding: 0 16px 28px;
  font-size: 13px;
  color: #dcc6c7;
}

.fss-footer a {
  color: #f7c3c5;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .fss-theme .pf-v5-c-login {
    padding: 84px 16px 32px;
  }

  .fss-theme .pf-v5-c-login__container {
    gap: 28px;
  }

  .fss-logo {
    width: 210px;
  }

  .fss-theme .pf-v5-c-login__main {
    --pf-v5-c-login__main-header--PaddingTop: 28px;
    --pf-v5-c-login__main-header--PaddingRight: 22px;
    --pf-v5-c-login__main-header--PaddingLeft: 22px;
    --pf-v5-c-login__main-header--md--PaddingRight: 22px;
    --pf-v5-c-login__main-header--md--PaddingLeft: 22px;
    --pf-v5-c-login__main-header--PaddingBottom: 20px;
    --pf-v5-c-login__main-body--PaddingRight: 22px;
    --pf-v5-c-login__main-body--PaddingLeft: 22px;
    --pf-v5-c-login__main-body--md--PaddingRight: 22px;
    --pf-v5-c-login__main-body--md--PaddingLeft: 22px;
    --pf-v5-c-login__main-body--PaddingBottom: 24px;
  }

  .fss-theme #kc-page-title {
    font-size: 23px;
    line-height: 28px;
  }

  .fss-locale {
    top: 16px;
    right: 16px;
  }

  .fss-mark {
    left: auto;
    right: -150px;
    bottom: auto;
    top: 150px;
    width: 440px;
    height: 525px;
  }

  .fss-blob--left {
    width: 400px;
    height: 400px;
    left: -200px;
  }

  .fss-blob--right {
    width: 380px;
    height: 340px;
  }
}

/* Registration: fields in the brand mockup's order; two columns on wider screens. */
.fss-theme #kc-register-form > * { order: 20; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="username"]) { order: 1; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="email"]) { order: 2; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="firstName"]) { order: 3; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="lastName"]) { order: 4; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="password"]) { order: 5; }
.fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label[for="password-confirm"]) { order: 6; }
.fss-theme #kc-register-form > #kc-form-buttons { order: 30; }
.fss-theme #kc-register-form > .pf-v5-c-login__main-footer-band { order: 31; }

@media (min-width: 720px) {
  .fss-theme .pf-v5-c-login__container:has(#kc-register-form) {
    max-width: 600px;
  }

  .fss-theme #kc-register-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }

  .fss-theme #kc-register-form > * {
    grid-column: 1 / -1;
  }

  .fss-theme #kc-register-form > .pf-v5-c-form__group:has(> .pf-v5-c-form__group-label > label:is([for="username"], [for="email"], [for="firstName"], [for="lastName"], [for="password"], [for="password-confirm"])) {
    grid-column: auto;
  }
}
