body {
  font-size: 16px;
  min-height: 100dvh !important;
  height: fit-content !important;
}

.background {
  width: 100%;
  min-height: 50vh;
  background: transparent url("../img/background.png") no-repeat 0 0;
  background-size: cover;
  position: fixed;
  bottom: 0;
  pointer-events: none;
}

.tilde-logo {
  margin: 12px 0;
  min-height: 40px;
  width: 45px;
  display: inline-block;
  background-image: url("../img/logo.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.login-form-card-timeout {
  z-index: 1;
  max-width: 450px;
  width: 100%;
  padding: 32px 24px 12px 24px;
  border-radius: 12px;
  box-shadow: 0px 1px 3px 1px #00000026;
  box-shadow: 0px 1px 2px 0px #0000004d;
  background-color: #fff !important;
  position: relative;  
}

.login-form-card, #kc-otp-login-form, .card-pf:has(#kc-totp-settings, #kc-terms-text), .card-pf:has(#kc-passwd-update-form) {
  z-index: 1;
  max-width: 450px;
  width: 100%;
  padding: 32px 24px 32px 24px;
  border-radius: 12px;
  box-shadow: 0px 1px 3px 1px #00000026;
  box-shadow: 0px 1px 2px 0px #0000004d;
  background-color: #fff !important;
  position: relative;
}

.card-pf:has(#kc-totp-settings) {
  max-width: 580px;
}

.card-pf:has(#kc-totp-settings) .subtitle {
  display: none;
}

#kc-totp-settings {
  align-self: start;
}

.login-pf-page .card-pf p {
    color: #000 !important;
}

.alert {
  padding: 12px 12px 12px 42px !important;
}

li:has(img) {
  display: flex;
  flex-direction: column;
}

img, p:has(a) {
  align-self: center;
}

.alert-warning {
  background-color: #E1EEF9;
  border: none;
}

.card-pf:has(#kc-totp-settings) .alert-warning {
  max-width: 100% !important;
}

#kc-totp-settings-form,
#kc-passwd-update-form {
  width: 100%;
}

#kc-form-buttons {
  margin: 0 !important;
}

.card-pf:has(#kc-passwd-update-form) #kc-page-title, .card-pf:has(#kc-totp-settings) #kc-page-title, .card-pf:has(#kc-terms-text) #kc-page-title {
  font-weight: 400;
  font-size: 32px;
  margin-bottom: 32px;
  margin-top: 0;
}

.form-horizontal .form-group {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.card-pf form.form-actions .btn {
    margin-left: 0 !important;
}

 #kc-otp-login-form {
    padding-bottom: 12px;
 }

.login-form-card__heading {
  font-size: 32px;
  text-align: center;
  width: 100%;
  display: block;
  margin-bottom: 32px;
}

.login-form-card__hint {
  display: block;
  margin-bottom: 32px;
  width: 100%;
  font-weight: 400;
  font-size: 16px;
  text-align: center;
  color: #656E76;
}

.tilde-authenticator-title {
  font-weight: 600;
  color: #97002d;
  margin-left: 12px;
}

.login-pf-page {
  padding-top: 0 !important;
}

.header-actions {
  display: flex;
  align-items: center;
}

#session-expired-resume-login {
  color: #811835 !important;
  border: 1px solid #cbd2d9 !important;
  background: white !important;
  font-weight: bold;
  margin-top: 30px;
  border-radius: 3px;
}

#session-expired-resume-login:hover {
  color: #6d162f !important;
  text-decoration: none !important;
}

.sign-up-button {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 10px 24px;
  border: 2px solid #847374;
  border-radius: 4px;
  color: #811835;
  transition: 0.2s;
}

.sign-up-button:hover, .sign-up-button:active, .sign-up-button:focus {
  background-color: #f1eeee;
  color: #811835 !important;
  text-decoration: none !important;
  outline: none !important;
}

#kc-info-wrapper {
  display: none;
}

#kc-info-wrapper:has(#kc-registration) {
  display: block;
}

.social-providers-divider {
  display: flex;
  align-items: center;
  color: #656E76;
  font-size: 14px;
  white-space: nowrap;
  margin-top: 1em;
} 

.social-providers-divider span {
  margin: 0 12px;
}

.divider-line {
  border: 1px solid #bcc0c3;
  width: 100%;
}

#kc-header-wrapper {
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4em;
  padding: 0px;
  white-space: normal;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: justify;
  -ms-flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.kc-dropdown {
  display: flex;
  align-items: center;
}

a#kc-current-locale-link {
  color: #97002d;
  font-weight: 500;
}

.kc-dropdown-item a {
  text-align: start;
}

a#kc-current-locale-link::after {
  content: url('data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.5%207.27875L12.4425%206.22125L9%209.65625L5.5575%206.22125L4.5%207.27875L9%2011.7788L13.5%207.27875Z%22%20fill%3D%22%23811835%22%2F%3E%3C%2Fsvg%3E');
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  transition: transform 0.3s ease; 
}

a#kc-current-locale-link:hover::after,
a#kc-current-locale-link:focus::after,
a#kc-current-locale-link:active::after {
  transform: rotate(180deg);
}

.alert {
  max-width: 450px !important;
  width: 100%;
  border-radius: 8px;
}

.tilde-logo-wrapper {
  display: flex;
  align-items: center;
}

#kc-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#kc-locale ul li a:hover {
  background-color: #FDF2F2;
}

#kc-header {
  flex-basis: 100%;
  border-bottom: 1px solid #dee0e3;
  color: #363636;
}

.card-pf {
  background: transparent;
  margin: 0 auto;
  padding: 0 20px;
  max-width: 540px;
  border-top: 0;
  box-shadow: 0 0 0;
}

.login-pf-header {
  margin-bottom: 0 !important;
}

.login-pf-page .login-pf-signup {
  font-size: 15px;
  color: #72767b;
}

.login-pf-page .login-pf-signup {
  margin: 0;
}

.container {
  height: 100%;
  background-color: #fff;
}

.pf-c-form-control,
.form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.mat-input-element {
  background: 0 0;
  border: none;
  outline: 0;
  padding: 0 0.6rem;
  margin: 0;
  width: 100%;
  max-width: 100%;
  vertical-align: bottom;
  font-size: 1rem;
  height: 2.8rem;
  border-radius: 5px;
  border: 1px solid #b0bec5;
}

#kc-form {
  margin-top: 32px;
}

#kc-form-options input[type=checkbox] {
  accent-color: #811835;
  scale: 1.5;
  position: initial;
  vertical-align: baseline;
  margin-right: 5px;
}

#kc-form-options label {
  color: #000;
  margin-left: 5px;
  font-size: 14px;
}

#kc-terms-text {
  margin-bottom: 20px;
  overflow: auto;
}

#kc-content {
  padding-bottom: 0;
}

.password-update-hint {
  margin-bottom: 32px;
}

.btn,
[type="submit"] {
  border-top-right-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  border-top-left-radius: 4px !important;
  border-bottom-left-radius: 4px !important;
  border-bottom: none;
  z-index: 1000;
  padding: 0 1rem;
  margin: auto;
  width: 90%;
  min-width: 70px;
  height: 40px;
  background: none;
}

.btn-primary,
.btn-primary:active:hover,
.btn-primary:active:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.pf-m-primary,
.pf-m-primary:active:hover,
.pf-m-primary:active:focus,
.pf-m-primary:hover,
.pf-m-primary:focus,
.pf-m-primary:active {
  color: #fff !important;
  background-color: #811835 !important;
  border-color: #811835 !important;
}

.btn-default,
.pf-m-default {
  padding: 10px 12px;
  border: 1px solid #cbd2d9;
  color: #72767b;
}

.form-control,
.pf-c-form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.pf-c-form-control:focus {
  color: #495057;
  background-color: #fff !important;
  border-color: #0A70C2;
  outline: 0;
  box-shadow: 0 0 0 1px #0A70C2;
}

.login-pf-settings input[type="checkbox"] {
  margin-top: 8px;
}

a {
  color: #811835;
  text-decoration: none;
  background-color: transparent;
}

.login-pf a:hover {
  color: #6d162f;
  text-decoration: underline;
}

a.back:before {
  content: url("../img/arrow-back.svg");
  z-index: 100000;
  margin-right: 5px;
  padding-top: 5px;
}

.kc-social-links {
  display: block;
  width: 100%;
}

a.tld-social-provider {
  margin-top: 1em;
  border: 1px solid #847374 !important;
  background-color: white;
  display: flex !important;
  text-align: center;
  align-items: center;
  justify-content: center;
  width: 100%;
}

a.tld-social-provider:hover {
  text-decoration: none;
}

.kc-social-provider-logo {
  display: none !important;
}

.login-pf-page .form-control {
  font-size: 16px !important;
  height: 48px !important;
}

.pf-c-button {
  font-family: inherit;
}

.sign-actions-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-top: 32px;
  font-size: 12px;
}

.form-password-wrapper {
  margin-top: 20px;
}

.forgot-password {
  margin-left: auto;
}

.tld-custom-input-wrapper {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tld-custom-input-textfield {
  width: 100%;
  position: relative;
}

.tld-custom-input-textfield label {
  position: absolute;
  font-size: 1rem;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  color: gray;
  padding: 0 0.3rem;
  margin: 0 0.5rem;
  transition: 0.1s ease-out;
  transform-origin: left top;
  pointer-events: none;
  font-weight: 400;
  font-size: 14px;
}

.tld-custom-input-textfield input {
  width: 100%;
  height: 48px;
  font-size: 16px;
  outline: none;
  border: 1px solid gray;
  border-radius: 5px;
  padding: 0.25rem 0.7rem;
  transition: 0.1s ease-out;
  color: #000 !important;
}

.tld-custom-input-textfield input:focus {
  border-color: #0A70C2;
}

.tld-custom-input-textfield input:focus+label {
  color: #0A70C2;
  top: 0;
  transform: translateY(-50%) scale(0.9) !important;
}

.tld-custom-input-textfield input:not(:placeholder-shown)+label {
  top: 0;
  transform: translateY(-50%) scale(0.9) !important;
}

.tld-custom-input-textfield input:not(:focus)::placeholder {
  opacity: 0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

input:-webkit-autofill {
  appearance: none;
  -webkit-appearance: none;
  background-color: white !important;
}

.term-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.term-actions .btn {
  width: 100%;
}

.term-actions .btn-default {
  color: #6d162f;
}

.sign-up-wrapper:not(.cant-login) {
  white-space: nowrap;
}

.sign-up-wrapper.cant-login {
  max-width: 250px;
}

.switch-account {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
  font-size: 14px;
}

.otp-title {
  display: block;
  font-size: 32px;
  text-align: center;
}

.otp-form {
  margin-top: 24px;
}

.username-wrapper {
  margin-top: 24px;
}

#kc-attempted-username {
  color: #656E76;
}

#kc-totp-settings ul {
  list-style: disc !important;
  margin-left: 40px !important;
}

@media (max-width: 840px) {
  .login-pf-page .card-pf {
    max-width: none;
    margin-left: 20px;
    margin-right: 20px;
    padding: 20px 20px 30px 20px;
  }
}

@media (max-width: 767px) {
  .login-pf-page .card-pf {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
  }
  .card-pf.login-pf-accounts {
    max-width: none;
  }
  .tilde-authenticator-title {
    display: none;
  }
}

@media (min-width: 768px) {
  .login-pf-page .card-pf {
    padding: 0px;
  }
}