@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/OpenSans-Variable.woff2") format("woff2");
}

:root {
  --pf-v5-global--FontFamily--heading: "Open Sans", "Helvetica Neue", "Arial", sans-serif;
  --pf-v5-global--FontFamily--text: "Open Sans", "Helvetica Neue", "Arial", sans-serif;

  /* keep in step with colorAppBgDefault / colorBrand2_200 /
     outlineButtonColorBorderDefault in app-content theme.yml */
  --slice-canvas: #f7f8f9;
  --slice-hairline: #d9d9d9;
  --slice-outline-border: #575757;

  --slice-accent: #D91451;
  --slice-accent-soft: #fdeaf0;

  --slice-error: #D91451;
  --slice-error-strong: #8a0e33;
  --slice-error-border: #f2c2d1;
  --slice-error-tint: #fdf6f8;

  --slice-field-border: #757575;
  --slice-field-border-active: #171717;
  --slice-field-height: 64px;
  --slice-field-radius: 8px;
  --slice-error-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.75a9.25 9.25 0 1 0 0 18.5 9.25 9.25 0 0 0 0-18.5Zm0 1.5a7.75 7.75 0 1 1 0 15.5 7.75 7.75 0 0 1 0-15.5Zm-.75 3.5h1.5v6h-1.5Zm.75 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z'/%3E%3C/svg%3E");
}

div#kc-header-wrapper {
  position: relative;
  height: 64px;
  padding: 8px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0px 1px 4px 0px rgba(83, 78, 79, 0.16), 0px 8px 24px -6px rgba(24, 39, 75, 0.08);
  background-color: white;
  border-bottom: 1px solid var(--slice-hairline);
  margin-block-end: 32px;
}

.pf-v5-c-login__header {
  margin-block-start: auto;
  padding-inline: 0;
}

div#kc-logo-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  margin-right: auto;
  min-width: 0;
}

div.kc-logo-text {
  margin: 0;
  width: 120px;
  height: 44px;
  z-index: 2;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

div.kc-logo-text.slice-logo {
  background-image: url('../img/slice-logo-text.svg');
  width: 82px;
  height: 44px;
}

/* Keep the brand name for screen readers, but hide it visually (the logo image
   conveys it sighted). Visually-hidden rather than display:none for a11y. */
div.kc-logo-text span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Agent logo is fetched by ref_agent_id from the public assets bucket; script.js
   adds .co-brand or .whitelabel only once the image has actually loaded. */
div#agent-partnership {
  display: none;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

div#agent-partnership.co-brand,
div#agent-partnership.whitelabel {
  display: flex;
}

#agent-partnership-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.15px;
  color: #404040;
  white-space: nowrap;
}

div#agent-partnership.whitelabel #agent-partnership-label {
  display: none;
}

img.agent-logo {
  display: none;
  width: auto;
}

div#agent-partnership.co-brand img.agent-logo {
  display: block;
  max-height: 32px;
  max-width: 220px;
}

div#agent-partnership.whitelabel img.agent-logo {
  display: block;
  max-height: 44px;
  max-width: 280px;
}

@media screen and (max-width: 564px) {
  div#kc-header-wrapper { height: 56px; padding: 8px 20px; }
  #locale-switcher { right: 20px; }
  div#kc-logo-group { gap: 8px; }
  div.kc-logo-text.slice-logo { width: 67px; height: 36px; }
  div#agent-partnership { gap: 4px; }
  #agent-partnership-label { font-size: 10px; letter-spacing: 0; white-space: normal; }
  div#agent-partnership.co-brand img.agent-logo { max-height: 24px; max-width: 120px; }
  div#agent-partnership.whitelabel img.agent-logo { max-height: 36px; max-width: 200px; }
}

.pf-v5-c-login__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: unset;
  padding-inline: 0;
}

.pf-v5-c-login__main {
  align-self: center;
  width: 50%;
  min-width: 500px;
  max-width: 550px;
  border-radius: 4px;
  border: 1px solid var(--slice-hairline);
  box-shadow: 0px 1px 4px 0px rgba(83, 78, 79, 0.16), 0px 8px 24px -6px rgba(24, 39, 75, 0.08);
}

@media screen and (max-width: 564px) {
  .pf-v5-c-login__main {
    width: auto;
    min-width: unset;
    margin: 0 24px;
  }
}

.pf-v5-c-login {
  padding-top: 0;
  align-items: flex-start;
}

.pf-v5-c-login__main-header {
  display: block;
  padding: 48px 48px 0;
}

/* PatternFly draws button borders on :after, which this theme disables, so
   outlined buttons need a real border of their own */
#kc-social-providers a {
  color: black !important;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid var(--slice-outline-border);
}

#kc-social-providers a svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  position: absolute;
  left: 15px;
}

/* Per-agent SSO button logo (agent's mark from the assets bucket, added by
   script.js). Left-aligned in the same slot as the social svg; height-bounded
   with contain so wide lockups scale without distortion. */
#kc-social-providers a .agent-sso-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  max-width: 56px;
  object-fit: contain;
}

.pf-v5-c-title {
  font-size: 34px !important;
  font-weight: 600 !important;
  letter-spacing: 0.25px !important;
  line-height: 40px !important;
  margin: 0;
  margin-bottom: 16px;
}

.login-pf body {
  background: var(--slice-canvas);
}

input[type="text"],
input[type="password"] {
  border: 1px solid #a6a6a6;
  border-radius: 4px;
  padding: 8px 12px;
}

.slice-field {
  position: relative;
}

.slice-field .slice-field__label {
  position: absolute;
  top: calc(var(--slice-field-height) / 2);
  left: 15px;
  right: 15px;
  transform: translateY(-50%);
  padding: 0;
  font-size: 16px;
  line-height: 1.2;
  color: #575757;
  pointer-events: none;
  z-index: 1;
  transition: top 140ms ease, font-size 140ms ease, color 140ms ease;
}

.slice-field .slice-field__label .pf-v5-c-form__label,
.slice-field .slice-field__label .pf-v5-c-form__label-text {
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}

.slice-field:focus-within .slice-field__label,
.slice-field.slice-field--filled .slice-field__label {
  top: 17px;
  font-size: 12px;
}

.slice-field .pf-v5-c-form__label-required {
  font-size: 14px;
  margin-inline-start: 3px;
  vertical-align: baseline;
  color: var(--slice-error);
}

.slice-field:focus-within .slice-field__label {
  color: var(--slice-field-border-active);
}

.slice-field.slice-field--error .slice-field__label {
  color: var(--slice-error);
}

.slice-field .slice-field__box {
  border: 1px solid var(--slice-field-border);
  border-radius: var(--slice-field-radius);
  background-color: #fff;
}

.slice-field:focus-within .slice-field__box {
  border-color: var(--slice-field-border-active);
  box-shadow: inset 0 0 0 1px var(--slice-field-border-active);
}

.slice-field.slice-field--error .slice-field__box {
  border-color: var(--slice-error);
  box-shadow: inset 0 0 0 1px var(--slice-error);
  background-color: var(--slice-error-tint);
}

.slice-field__box:focus-within,
.slice-field input:focus,
.slice-field .pf-v5-c-button.pf-m-control:focus {
  outline: none;
}

.slice-field input {
  height: var(--slice-field-height);
  width: 100%;
  border: none;
  border-radius: var(--slice-field-radius);
  background: transparent;
  padding: 22px 14px 6px;
  font-size: 16px;
}

.slice-field .pf-v5-c-input-group .pf-v5-c-form-control {
  border: none;
  background: transparent;
}

.slice-field .pf-v5-c-form-control__utilities {
  display: none;
}

.slice-field .pf-v5-c-button.pf-m-control {
  width: 48px;
  height: var(--slice-field-height);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #575757;
}

/* Password input before/after */
.pf-v5-c-form-control:after,
.pf-v5-c-form-control:before {
  content: initial;
  inset: initial;
  pointer-events: none;
  position: absolute;
  display: none;
}

.pf-v5-c-button {
  border-radius: 1000px;
  height: 42px;
  cursor: pointer;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  display: block;
}

/* only the filled button lifts, as with the app's OutlineButton */
.pf-v5-c-button.pf-m-primary:hover {
  box-shadow: 0px 1px 4px 0px rgba(83, 78, 79, 0.16), 0px 8px 24px -6px rgba(24, 39, 75, 0.08);
}

.pf-v5-c-button.pf-m-primary {
  background-color: var(--slice-accent);
}

.pf-v5-c-button.pf-m-secondary {
  color: #000000;
  margin-top: 16px;
  border: 1px solid var(--slice-outline-border);
}

/* Form actions - stack buttons vertically, full width */
.pf-v5-c-form__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

/* the gap above already spaces these; the margin stays for standalone buttons */
.pf-v5-c-form__actions .pf-v5-c-button.pf-m-secondary {
  margin-top: 0;
}

/* keycloak.v2 leaves kcButtonDefaultClass undefined, so older templates
   (login-config-totp) render Cancel as a bare, filled-grey button */
.pf-v5-c-form__actions .pf-v5-c-button:not(.pf-m-primary):not(.pf-m-secondary):not(.pf-m-control):not(.pf-m-link) {
  color: #000000;
  background-color: transparent;
  border: 1px solid var(--slice-outline-border);
}

/* In 2FA (OTP) forms, allow action buttons to be full width */
#kc-otp-login-form .pf-v5-c-form__actions .pf-v5-c-button {
  max-width: none;
}

/* Style input[type="submit"] to match button elements */
input[type="submit"].pf-v5-c-button {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  text-align: center;
  border-radius: 1000px;
  border: none;
}

/* Fix overflow clipping on form action groups so buttons show rounded corners */
.pf-v5-c-form__group.pf-m-action {
  overflow: visible;
}

.pf-v5-c-button:after {
  content: none;
}

#kc-form-options {
  margin-bottom: 16px;
}

#kc-form-login #kc-form-options {
  margin-bottom: 0;
}

a {
  color: var(--slice-accent) !important;
}

.pf-v5-c-button.pf-m-control {
  box-shadow: none;
}

.pf-v5-c-button.pf-m-control:after {
  box-shadow: none;
  inset: initial;
}

.pf-v5-c-helper-text__item-text {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgb(47, 79, 79)
}

.pf-v5-c-helper-text__item-text.pf-m-error {
  color: var(--slice-error);
}

.slice-field .pf-v5-c-helper-text__item-text {
  margin-bottom: 0;
  margin-top: 6px;
}

.pf-v5-c-alert {
  margin-bottom: 16px;
}

.instruction {
  margin-bottom: 16px;
}

.pf-v5-c-login__container {
  color: #404040;
}

.locale-toggle {
  border: none;
  color: black;
  background-color: white;
  text-transform: uppercase;
  line-height: 1;
  padding: 0px;
}

#locale-switcher {
  display: flex;
  position: absolute;
  right: 40px;
  margin: 0px;
}

button#locale-option.active {
  font-weight: bold;
  text-decoration: underline;
}

.pf-v5-c-login__main-footer-band:first-child {
  /* Centre the divider between the login button and "Or sign in with":
     more space above the line, less below (base theme padding-top is 24px). */
  margin-top: 32px;
  padding-top: 16px;
}

#kc-page-title:has(.verify-email-icon) {
  text-align: center;
}

.verify-email-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  padding: 16px;
  border-radius: 50%;
  background-color: var(--slice-accent-soft);
  color: var(--slice-accent);
}

.verify-email-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.verify-email {
  text-align: center;
}

.verify-email-lead {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.5;
}

.verify-email-address {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #171717;
  overflow-wrap: anywhere;
}

.verify-email-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--slice-hairline);
}

.verify-email-hint {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}

.verify-email-button {
    display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 200px;
  height: 48px;
  margin: 0;
  padding: 0 32px;
  line-height: 1;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--slice-accent) !important;
  background-color: transparent;
  border: 1.5px solid var(--slice-accent);
  transition: background-color 140ms ease;
}

.verify-email-button:hover {
  background-color: var(--slice-accent-soft);
  box-shadow: none;
}

.verify-email-actions form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.verify-email-cancel {
  border: none;
  background: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--slice-accent);
  text-decoration: underline;
  cursor: pointer;
}

.pf-v5-c-form:has(> .username-restart) {
  row-gap: 8px;
}

.username-restart {
  justify-self: end;
  font-size: 14px;
}

.verify-email-restart {
  display: block;
  margin-top: 16px;
  font-size: 14px;
}

/* switch out OKTA SSO logo to not use default "cube" */
#kc-logout-confirm #kc-info-message {
  margin-top: 16px;
  text-align: center;
}

.register-login-prompt {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.5;
}

.register-login-prompt a {
  font-weight: 700;
  text-decoration: none;
}

.register-alert {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--slice-error-border);
  border-radius: 8px;
  background-color: var(--slice-error-tint);
}

.register-alert-icon {
  width: 24px;
  height: 24px;
  color: var(--slice-error);
}

.register-alert-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.register-alert-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--slice-error-strong);
}

.register-alert-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.register-alert-actions {
  display: flex;
  gap: 24px;
  margin: 12px 0 0;
}

.register-alert-actions a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

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

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

#kc-register-form > .pf-v5-c-form__group:has(#firstName) {
  grid-column: 1;
}

#kc-register-form > .pf-v5-c-form__group:has(#lastName) {
  grid-column: 2;
}

@media screen and (max-width: 564px) {
  #kc-register-form > .pf-v5-c-form__group:has(#firstName),
  #kc-register-form > .pf-v5-c-form__group:has(#lastName) {
    grid-column: 1 / -1;
  }
}

.slice-field--error .pf-v5-c-helper-text__item-text.pf-m-error::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-inline-end: 6px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: var(--slice-error-icon) center / contain no-repeat;
  mask: var(--slice-error-icon) center / contain no-repeat;
}

.pf-v5-c-login__main:has(#kc-totp-settings-form) {
  width: 100%;
  min-width: 0;
  max-width: min(900px, calc(100vw - 48px));
}

.totp-subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.5;
}

.totp-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}

.totp-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--slice-accent-soft);
  color: var(--slice-accent);
  font-size: 14px;
  font-weight: 700;
}

.totp-step-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  color: #171717;
}

.totp-step-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
}

.totp-app-list a {
  text-decoration: none;
}

.totp-app-external {
  margin-inline-start: 4px;
}

.totp-app-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.totp-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--slice-hairline);
}

.totp-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.totp-columns > .totp-step--verify {
  padding-inline-start: 32px;
  border-inline-start: 1px solid var(--slice-hairline);
}

.totp-qr {
  display: inline-block;
  padding: 12px;
  border: 1px solid var(--slice-hairline);
  border-radius: 8px;
  background-color: #fff;
}

.totp-qr img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
}

.totp-mode-switch {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
}

.totp-secret-key {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--slice-hairline);
  border-radius: 8px;
  background-color: var(--slice-canvas);
  font-family: monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.totp-policy {
  margin: 0 0 12px;
  padding-inline-start: 18px;
  font-size: 13px;
}

.totp-device-hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #575757;
}

.totp-step--verify .pf-v5-c-form__group + .pf-v5-c-form__group {
  margin-top: 16px;
}

.totp-logout-sessions {
  font-size: 14px;
}

.totp-actions {
  margin-top: 24px;
  text-align: center;
}

.totp-submit {
  width: 100%;
  max-width: none;
}

.totp-cancel {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--slice-accent);
  cursor: pointer;
}

@media screen and (max-width: 720px) {
  .totp-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .totp-columns > .totp-step--verify {
    padding-inline-start: 0;
    padding-top: 24px;
    border-inline-start: none;
    border-top: 1px solid var(--slice-hairline);
  }
}

#social-saml-okta-userrealm svg {
  background-image: url('../img/okta-logo.svg');
  background-size: contain;

  & path {
    display: none;
  }
}