/* App wrapper - full viewport layout */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100vw;
  background: #1d212b;
}

/* Main content area - grows to fill space between header and footer */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Login container - centers the login form */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
}

.login-pf {
  background: #1d212b;
}

body {
  margin: 0;
  padding: 0;
  background: #1d212b;
}

.login-pf-page {
  padding: 0;
  width: 100%;
}

.login-pf-settings {
  margin: 24px 0;
}

.forgot-password-link {
  color: #3db60f;
  font-weight: bold;
}
.login-pf .forgot-password-link:hover {
  color: #3db60f;
}

.kc-grid {
  font-size: 1rem;
}

.pf-c-input-group {
  background: #1d2530;
}
.pf-c-form-control {
  padding: 16px 14px !important;
  border-radius: 32px;
  border: 1px solid #4d5d7c !important;
  color: #82868c;
  height: 52px !important;
  background: #313849;
  &[readonly] {
    cursor: not-allowed;
    background-color: #363d47;
  }
}

.pf-c-form-control::placeholder {
  color: #adb8cc;
  opacity: 1;
}

.pf-c-form-control::-webkit-input-placeholder {
  color: #adb8cc;
  opacity: 1;
}

.pf-c-form-control::-moz-placeholder {
  color: #adb8cc;
  opacity: 1;
}

.pf-c-form-control:-ms-input-placeholder {
  color: #adb8cc;
  opacity: 1;
}
.pf-c-form-control:focus-visible {
  outline: none;
}

.pf-c-form-control[aria-invalid='true'] {
  border-color: #c9190b;
  background-image: none;
}

.pf-c-form__label-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  text-align: left;
  color: #ffffff;
  margin-bottom: 8px;
}

.pf-c-alert.pf-m-inline {
  border-radius: 4px;
  margin-bottom: 0.5rem; /* default - IE compatibility */
  margin-bottom: var(--pf-global--spacer--sm);
  padding: 0.25rem;
  padding: var(--pf-global--spacer--xs);
  border: solid #ededed;
  border: solid var(--pf-global--BorderColor--300);
  border-width: 1px;
  border-width: var(--pf-c-alert--m-inline--BorderTopWidth)
    var(--pf-c-alert--m-inline--BorderRightWidth)
    var(--pf-c-alert--m-inline--BorderBottomWidth)
    var(--pf-c-alert--m-inline--BorderLeftWidth);
  display: -ms-flexbox;
  display: grid;
  -ms-grid-columns: max-content 1fr max-content;
  grid-template-columns: max-content 1fr max-content;
  grid-template-columns: var(--pf-c-alert--grid-template-columns);
  grid-template-rows: 1fr auto;
  grid-template-rows: var(--pf-c-alert--grid-template-rows);
}

.pf-c-alert.pf-m-inline::before {
  position: absolute;
  top: -1px;
  top: var(--pf-c-alert--m-inline--before--Top);
  bottom: -1px;
  bottom: var(--pf-c-alert--m-inline--before--Bottom);
  left: 0;
  width: 3px;
  width: var(--pf-c-alert--m-inline--before--Width);
  content: '';
  background-color: #ffffff;
  background-color: var(--pf-global--BackgroundColor--100);
}

.pf-c-alert.pf-m-inline.pf-m-success::before {
  background-color: #92d400;
  background-color: var(--pf-global--success-color--100);
}

.pf-c-alert.pf-m-inline.pf-m-danger::before {
  background-color: #c9190b;
  background-color: var(--pf-global--danger-color--100);
}

.pf-c-alert.pf-m-inline.pf-m-warning::before {
  background-color: #f0ab00;
  background-color: var(--pf-global--warning-color--100);
}

.pf-c-alert.pf-m-inline .pf-c-alert__icon {
  padding: 1rem 0.5rem 1rem 1rem;
  padding: var(--pf-c-alert--m-inline__icon--PaddingTop)
    var(--pf-c-alert--m-inline__icon--PaddingRight)
    var(--pf-c-alert--m-inline__icon--PaddingBottom)
    var(--pf-c-alert--m-inline__icon--PaddingLeft);
  font-size: 16px;
  font-size: var(--pf-c-alert--m-inline__icon--FontSize);
}

.pf-c-alert.pf-m-success .pf-c-alert__icon {
  color: #92d400;
  color: var(--pf-global--success-color--100);
}

.pf-c-alert.pf-m-success .pf-c-alert__title {
  color: #486b00;
  color: var(--pf-global--success-color--200);
}

.pf-c-alert.pf-m-danger .pf-c-alert__icon {
  color: #c9190b;
  color: var(--pf-global--danger-color--100);
}

.pf-c-alert.pf-m-danger .pf-c-alert__title {
  color: #a30000;
  color: var(--pf-global--danger-color--200);
}

.pf-c-alert.pf-m-warning .pf-c-alert__icon {
  color: #f0ab00;
  color: var(--pf-global--warning-color--100);
}

.pf-c-alert.pf-m-warning .pf-c-alert__title {
  color: #795600;
  color: var(--pf-global--warning-color--200);
}

.pf-c-alert__title {
  font-size: 14px; /* default - IE compatibility */
  font-size: var(--pf-global--FontSize--sm);
  padding: 5px 8px;
  padding: var(--pf-c-alert__title--PaddingTop)
    var(--pf-c-alert__title--PaddingRight)
    var(--pf-c-alert__title--PaddingBottom)
    var(--pf-c-alert__title--PaddingLeft);
}

.pf-c-button {
  border-radius: 4px;
  padding: 12px;
  font-weight: 600;
  height: 48px;
}
.pf-c-button[aria-controls='password-confirm'],
.pf-c-button[aria-controls='password-new'] {
  position: absolute;
  right: 22px;
  z-index: 101;
  color: #82868c;
}
#password-new,
#password-confirm {
  padding-right: 38px !important;
}

/* default - IE compatibility */
.pf-c-button.pf-m-primary {
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 32px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.pf-c-button.pf-m-primary:hover {
  background: #f5f5f5;
  border: 1px solid #f5f5f5;
  transform: translateY(-1px);
}

/*End of IE compatibility*/

#kc-locale ul {
  display: none;
  position: absolute;
  background-color: #fff;
  list-style: none;
  right: 0;
  min-width: 100px;
  padding: 2px 0;
  border: solid 1px #bbb;
}

#kc-locale:hover ul {
  display: block;
  margin: 0;
}

#kc-locale ul li a {
  display: block;
  padding: 5px 14px;
  color: #000 !important;
  text-decoration: none;
  line-height: 20px;
}

#kc-locale ul li a:hover {
  color: #4d5258;
  background-color: #d4edfa;
}

#kc-locale-dropdown a {
  color: #4d5258;
  background: 0 0;
  padding: 0 15px 0 0;
  font-weight: 300;
}

#kc-locale-dropdown a:hover {
  text-decoration: none;
}

a#kc-current-locale-link {
  display: block;
  padding: 7px 10px;
}

/* a#kc-current-locale-link:hover {
    background-color: rgba(0,0,0,0.2);
} */

a#kc-current-locale-link::after {
  content: '\25bc';
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

a#kc-current-locale-link:hover::after {
  transform: translate(0px, -1px) rotateX(180deg);
}

.login-pf .container {
  padding-top: 40px;
}

.login-pf a:hover {
  color: #0099d3;
}

.kc-logo-text {
  text-align: left;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#kc-header {
  color: #ededed;
  overflow: visible;
  white-space: nowrap;
  margin-bottom: 16px;
}

#kc-header-wrapper {
  font-size: 29px;
  letter-spacing: 3px;
  line-height: 1.2em;
  white-space: normal;
  padding: 24px 80px;
}

#kc-content {
  width: 100%;
}

.login-pf-header {
  position: relative;
}

#kc-page-title {
  color: #e2e3e4;
  font-size: 30px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
  margin: 16px 0 8px;
}
#kc-page-subtitle {
  color: #9b9ea3;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-align: center;
  margin: 0;
}

#kc-attempted-username {
  font-size: 20px;
  font-family: inherit;
  font-weight: normal;
  padding-right: 10px;
}

#kc-username {
  text-align: center;
  margin-bottom: -10px;
}

#kc-webauthn-settings-form {
  padding-top: 8px;
}

#kc-content-wrapper {
  margin-top: 20px;
}

#kc-form-wrapper {
  margin-bottom: 12px;
}

#kc-info {
  margin: 20px -40px -30px;
}

#kc-info-wrapper {
  font-size: 13px;
  padding: 15px 35px;
  background-color: #f0f0f0;
  border-radius: 4px;
}

#kc-form-options span {
  display: block;
}

#kc-form-options .checkbox {
  margin-top: 0;
  color: #72767b;
}

#kc-terms-text {
  color: #72767b;
  margin-bottom: 20px;

  > ul {
    padding-inline-start: 40px;
    list-style-type: disc;
  }
}

#kc-registration {
  margin-bottom: 0;
}

/* TOTP */

.subtitle {
  text-align: right;
  margin-top: 30px;
  color: #909090;
}

.required {
  color: #a30000; /* default - IE compatibility */
  color: var(--pf-global--danger-color--200);
}

ol#kc-totp-settings {
  margin: 0;
  padding-left: 20px;
}

ul#kc-totp-supported-apps {
  margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
  max-width: 150px;
  max-height: 150px;
}

#kc-totp-secret-key {
  background-color: #fff;
  color: #333333;
  font-size: 16px;
  padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
  margin-top: 0;
}

#kc-oauth ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#kc-oauth ul li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
  border-top: 0;
}

#kc-oauth .kc-role {
  display: inline-block;
  width: 50%;
}

/* Code */
#kc-code textarea {
  width: 100%;
  height: 8em;
}

.kc-social-provider-logo {
  font-size: 23px;
  width: 30px;
  height: 25px;
  float: left;
}

.access-request-section {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  text-align: center;
  color: #8bb8ee !important;
  font-weight: 600;
}

.access-request-text {
  font-size: 14px;
}

.access-request-link {
  text-decoration: none;
  font-weight: bold;
  color: #8bb8ee !important;
}

.access-request-link:hover {
  text-decoration: underline;
}

.identity-provider-login {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-items: center;
  gap: 16px;
  margin: 20px 0;
  color: #9b9ea3;
}
.identity-provider-login:before {
  content: '';
  height: 1px;
  background: #9b9ea3;
  flex: auto;
}
.identity-provider-login:after {
  content: '';
  height: 1px;
  background: #9b9ea3;
  flex: auto;
}
.identity-provider-login-label {
  flex: 1;
  margin: 0;
}

.pf-c-button.kc-social-gray {
  color: #b4b6ba;
  background: #1d2530;
  border: 1px solid #1d2530;
  border-radius: 32px;
  margin: 8px;
}

/* IDP Button Styles */
.pf-c-button.kc-social-gray.idp-ad-test {
  background: #6ef688;
  border: 1px solid #6ef688;
  color: #000000;
}

.pf-c-button.kc-social-gray.idp-external-test {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #000000;
}
.pf-c-button.kc-social-gray:hover {
  color: #b4b6ba;
  background: #1d2530;
  border: 1px solid #1d2530;
}

/* IDP Button Hover Styles - No color change */
.pf-c-button.kc-social-gray.idp-ad-test:hover {
  background: #6ef688;
  border: 1px solid #6ef688;
  color: #000000;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

.pf-c-button.kc-social-gray.idp-external-test:hover {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #000000;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}
.pf-c-button.kc-social-gray:after {
  content: none;
}

.kc-social-item {
  text-align: center;
}

.kc-social-provider-name {
  position: relative;
  top: 3px;
}

.kc-social-icon-text {
  left: -15px;
}

.idp-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  filter: brightness(0) invert(1); /* Makes SVG white for dark buttons */
}

.pf-c-button.kc-social-gray .idp-icon {
  filter: none; /* No filter for gray buttons to maintain original colors */
}

.kc-social-grid {
  display: grid;
  grid-column-gap: 10px;
  grid-row-gap: 5px;
  grid-column-end: span 6;
  --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
  left: -10px;
}

.kc-login-tooltip {
  position: relative;
  display: inline-block;
}

.kc-social-section {
  text-align: center;
}

.kc-social-section hr {
  margin-bottom: 10px;
}

.kc-login-tooltip .kc-tooltip-text {
  top: -3px;
  left: 160%;
  background-color: black;
  visibility: hidden;
  color: #fff;

  min-width: 130px;
  text-align: center;
  border-radius: 2px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  padding: 5px;

  position: absolute;
  opacity: 0;
  transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
  visibility: visible;
  opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
  content: ' ';
  position: absolute;
  top: 15px;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

@media (min-width: 768px) {
  #kc-container-wrapper {
    position: absolute;
    width: 100%;
  }

  .login-pf .container {
    padding-right: 80px;
  }

  #kc-locale {
    position: absolute;
    right: 0;
    text-align: right;
    z-index: 9999;
  }

  /* Hide mobile language selector on desktop */
  .kc-locale-mobile {
    display: none;
  }
}

@media (max-width: 767px) {
  .login-pf body {
    background: #040d19;
  }

  #kc-header {
    padding-left: 15px;
    padding-right: 15px;
    float: none;
    text-align: left;
    margin-bottom: 40px;
  }

  #kc-header-wrapper {
    font-size: 16px;
    font-weight: bold;
    padding: 20px 0 0 0;
    letter-spacing: 0;
  }

  #kc-page-title {
    color: #e2e3e4;
    text-align: center;
    margin: 24px 0 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
  }

  div.kc-logo-text {
    margin: 0;
    height: 32px;
    background-size: 100%;
  }

  .identity-provider-login {
    margin: 16px 0;
  }

  #kc-form {
    float: none;
  }

  #kc-info-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent;
  }

  .login-pf .container {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  /* Mobile language selector - positioned in its own row above logo */
  #kc-locale {
    position: static;
    text-align: right;
    width: 100%;
    margin-bottom: 16px;
    z-index: 9999;
  }

  #kc-locale #kc-locale-wrapper {
    display: inline-block;
    width: auto;
  }

  .page-container {
  }
}

@media (min-height: 646px) {
  #kc-container-wrapper {
    bottom: 12%;
  }
}

@media (max-height: 645px) {
  #kc-container-wrapper {
    padding-top: 50px;
    top: 20%;
  }
}

.card-pf form.form-actions .btn {
  float: right;
  margin-left: 10px;
}

#kc-form-buttons {
  margin-top: 10px;
}

.login-pf-page .login-pf-brand {
  /* margin: 0 auto; */
  margin-top: 20px;
  width: 180px;
}

/* Internet Explorer 11 compatibility workaround for select-authenticator screen */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .select-auth-box-parent {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    padding-bottom: 1rem;
    cursor: pointer;
  }

  .select-auth-box-headline {
    font-size: 16px;
    color: #06c;
    font-weight: bold;
  }

  .select-auth-box-desc {
    font-size: 14px;
  }

  .pf-l-stack {
    flex-basis: 100%;
  }
}
/* End of IE11 workaround for select-authenticator screen */

.select-auth-box-arrow {
  display: flex;
  align-items: center;
  margin-right: 2rem;
}

.select-auth-box-icon {
  display: flex;
  flex: 0 0 2em;
  justify-content: center;
  margin-right: 1rem;
  margin-left: 3rem;
}

.select-auth-box-parent {
  border-top: 1px solid var(--pf-global--palette--black-200);
  padding-top: 1rem;
  padding-bottom: 1rem;
  cursor: pointer;
}

.select-auth-box-parent:hover {
  background-color: #f7f8f8;
}

.select-auth-container {
  padding-bottom: 0px !important;
}

.select-auth-box-headline {
  font-size: var(--pf-global--FontSize--md);
  color: var(--pf-global--primary-color--100);
  font-weight: bold;
}

.select-auth-box-desc {
  font-size: var(--pf-global--FontSize--sm);
}

.card-pf {
  margin: 30px auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: #171a20;
  max-width: 700px;
  width: 90%;
  border-radius: 12px;
  padding: 24px;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* min-height: calc(100vh - 300px); */
}

/*phone*/
@media (max-width: 767px) {
  .login-pf-page .card-pf {
    max-width: none;
    margin: 20px 16px;
    padding: 24px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #171a20;
  }

  .kc-social-grid {
    grid-column-end: 12;
    --pf-l-grid__item--GridColumnEnd: span 12;
  }

  .kc-social-grid .kc-social-icon-text {
    left: -15px;
  }
}

.login-pf-page .login-pf-signup {
  font-size: 15px;
  color: #72767b;
}
#kc-content-wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
  margin-left: auto;
  margin-right: auto;
}

.login-pf-page .btn-primary {
  margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
  border-bottom: 1px solid #ededed;
}

.login-pf-page .list-view-pf-description {
  width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type {
  margin-bottom: 0px;
}

.no-bottom-margin {
  margin-bottom: 0;
}

#kc-back {
  margin-top: 5px;
}

.checkbox-wrapper {
  display: block;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.checkbox-wrapper input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background: #040d19;
  border: 1px solid #4f565e;
  border-radius: 4px;
}

/* On mouse-over, add a grey background color */
.checkbox-wrapper:hover input ~ .checkmark {
  background: #040d19;
  border: 1px solid #4f565e;
}

/* When the checkbox is checked, add a blue background */
.checkbox-wrapper input:checked ~ .checkmark {
  background-color: #3db60f;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: '';
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.checkbox-wrapper input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.checkbox-wrapper .checkmark:after {
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.password-field-wrapper {
  position: relative;
}

.password-field {
  padding-right: 36px !important;
}

.password-visibility-icon {
  position: absolute;
  right: 2px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  width: 28px;
}

.terms-heading {
  font-weight: 700;
  font-size: 14px;
}

/* Login Card Logo */
.login-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo {
  width: 80px;
  height: 80px;
  filter: brightness(0) invert(1); /* Makes SVG white */
}

#kc-content-wrapper .form-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.4rem;
}

/* Terms and Conditions page - Consistent button styling */
/* Target only the Terms page by using #kc-terms-text sibling selector */
#kc-terms-text ~ .form-actions .pf-c-button,
#kc-terms-text ~ .form-actions .btn,
#kc-terms-text ~ .form-actions .btn-default {
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 32px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex: 1;
}

#kc-terms-text ~ .form-actions .pf-c-button:hover,
#kc-terms-text ~ .form-actions .btn:hover,
#kc-terms-text ~ .form-actions .btn-default:hover {
  background: #f5f5f5;
  border: 1px solid #f5f5f5;
  transform: translateY(-1px);
}

/* Override any conflicting float styles for form-actions buttons on Terms page */
#kc-terms-text ~ .form-actions .btn {
  float: none;
  margin-left: 0;
}
