html,
body {
  font-family: "Greycliff CF", sans-serif !important;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

:root {
  --color-primary: #0073e6;

  --color-background-secondary: #f2f7fd;
  --color-background-tertiary: #fff;

  --color-text-secondary: #fff;
  --color-text-muted: #6a7282;

  --color-label: #2f3842;
  --color-placeholder: #838897;
  --color-background-logo-mobile: #2f3842;
  --color-error: #ff6467;
  --color-input-border: #b1b5c3;

  interpolate-size: allow-keywords;
}

* {
  box-sizing: border-box;
  font-family: "Greycliff CF", sans-serif !important;
}

.login {
  display: flex;
  flex: 1;
  background: inherit;
}

.left-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 16px 0px #2a333d;
  z-index: 5;
  background: var(--color-background-tertiary);
}

.left-panel .card {
  max-width: 522px;
  width: 100%;
  padding: 64px 16px;
}

.right-panel {
  width: 100%;
  height: 100%;
  background-image: url("../img/background.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.right-panel img {
  margin-top: auto;
  margin-bottom: 40px;
  width: 100%;
  max-width: 628px;
}

.header {
  text-align: center;
  color: var(--color-text-secondary);
  width: 100%;
}

.header #kc-page-title {
  font-weight: 700;
  font-size: 32px;
  margin-top: 0;
  color: var(--color-primary);
  text-align: left;
  margin-bottom: 54px;
}

.divider {
  padding-top: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 1rem;

  & > hr {
    width: 100%;
  }
}

#kc-content {
  margin-top: 28px;
  width: 100%;
  color: var(--color-text-muted);
}

.form-group {
  margin-bottom: 24px;
}

.form-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-options-wrapper {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.checkbox label {
  display: flex;
  align-items: center;
  color: var(--color-label);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  padding-left: 32px;
}

.checkbox label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox label .checkmark {
  position: absolute;
  top: -3px;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: transparent;
  border-radius: 6px;
  border: 1px solid var(--color-input-border);
}

.checkbox label .checkmark:after {
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid var(--color-background-tertiary);
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
  content: "";
  position: absolute;
  display: none;
}

.checkbox label input:focus-visible ~ .checkmark {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.checkbox label input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox label input:checked ~ .checkmark:after {
  display: block;
}

.form-options-wrapper a {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-primary);
}

.label-wrapper {
  display: flex;
  gap: 4px;
}

.label {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-label);
  padding-bottom: 12px;
  display: block;
}

.input {
  color: var(--color-label);
  border: 1px solid var(--color-input-border);
  background: transparent;
  border-radius: 16px;
  height: 45px;
  padding: 8px 16px;
  width: 100%;
  font-size: 14px;
  font-weight: 400;
}

.input::placeholder {
  color: var(--color-placeholder);
}

.input[aria-invalid="true"] {
  border: 1px solid var(--color-error);
  color: var(--color-error);
  outline-color: var(--color-error);
}

.input-error {
  display: block;
  margin-top: 8px;
  color: var(--color-error);
  font-size: 12px;
}

.primary,
.secondary {
  height: 45px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 18px;
  border: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a.primary,
a.secondary {
  &:not([href]) {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.primary {
  background-color: var(--color-primary);
  color: var(--color-text-secondary);
}

.secondary {
  background-color: var(--color-background-secondary);
  color: var(--color-label);
}

#kc-registration {
  text-align: center;
}

#kc-registration span {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-input-border);
  margin-right: 4px;
}

a {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
}

.alert {
  height: 56px;
  border-radius: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 8px;
  font-size: 14px;
}

.alert::before {
  margin-left: 8px;
  margin-right: 8px;
  height: 24px;
}

.alert-success {
  color: #016630;
  border: 1px solid #008236;
  background: #7bf1a8;
}

.alert-success:before {
  content: url("../img/success.svg");
}

.alert-error {
  color: #9f0712;
  border: 1px solid #9f0712;
  background-color: #ffc9c9;
}

.alert-error::before {
  content: url("../img/error.svg");
}

.alert-warning {
  background: #fef9c2;
  border: 1px solid #894b00;
  color: #894b00;
}

.alert-warning::before {
  content: url("../img/warning.svg");
}

#kc-social-providers {
  margin-bottom: 24px;
}

.select-wrapper {
  position: relative;
}

.select-wrapper img {
  position: absolute;
  top: 50%;
  right: 6px;
  cursor: pointer;
  z-index: 100;
  transform: translateY(-50%);
}

.select-wrapper select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  z-index: 100;
  position: relative;
}

.select-wrapper select.empty {
  color: var(--color-text-muted) !important;
}

.select-wrapper option {
  color: var(--color-label);
}

.select-wrapper option[value=""] {
  display: none;
  cursor: pointer;
}

#kc-form-buttons {
  width: 100%;
}

#kc-form-login {
  padding-top: 24px;
}

#kc-info {
  color: var(--color-text-muted);
  font-size: 14px;
}

#kc-decline {
  height: 45px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 18px;
  border: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background-color: var(--color-background-secondary);
  color: var(--color-label);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.breadcrumb-wrapper {
  margin-bottom: 24px;
}

.logo-mobile {
  width: 100%;
  margin: 0 auto;
  display: none;
}

.terms-checkbox {
  display: flex;
  align-items: center;
}

.terms-checkbox,
.terms-checkbox a {
  font-size: 14px;
  font-weight: 700;
}

.terms-checkbox label {
  width: 20px;
  height: 20px;
}

.terms-checkbox label .checkmark {
  top: 0 !important;
}

.totp-instructions {
  display: flex;
  flex-direction: column;
}

.totp-instructions ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.totp-instructions .section-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-label);
}

.totp-instructions .section-info {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-label);
}

.totp-instructions #mode-manual,
.totp-instructions #mode-barcode {
  margin-bottom: 1rem;
}

.totp-instructions .section-title:not(:first-child) {
  margin-top: 1rem;
}

.totp-instructions #kc-totp-secret-key {
  color: #a3a8f3;
  font-size: 1.5rem;
  font-weight: 500;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
}

.password-input-wrapper.password-hidden .password-visible,
.password-input-wrapper.password-visible .password-hidden {
  display: none;
}

.password-input-wrapper.password-hidden .password-hidden,
.password-input-wrapper.password-visible .password-visible {
  display: block;
}

.password-input-wrapper img {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.input-helper-text-before {
  font-size: 14px;
  margin-bottom: 6px;
}

textarea.input {
  min-height: 100px;
  padding-top: 16px;
  padding-bottom: 16px;
}

#kc-info hr,
#kc-info-message hr {
  border: none;
  height: 1px;
  color: var(--color-input-border);
  background-color: var(--color-input-border);
  margin-top: 24px;
  margin-bottom: 24px;
}

.local-account-message {
  color: var(--color-text-muted);
  height: 24px;
  display: flex;
  align-items: center;
  margin-top: 16px;

  &::before {
    content: url("../img/info.svg");
    padding-right: 4px;
    margin: auto 0;
  }
}

.local-account-wrapper {
  cursor: pointer;
  position: relative;
  margin: -4px;
  padding: 4px;

  details[open]::details-content {
    block-size: auto;
  }

  summary::-webkit-details-marker {
    display: none !important;
  }

  summary::marker {
    display: none;
  }

  summary {
    padding: 8px 0;
    list-style: none;
    font-weight: bold;
    color: var(--color-text-muted);
    text-align: center;
    position: relative;

    height: 45px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-input-border);

    &::after {
      content: url("../img/arrow_drop_down.svg");
      position: absolute;
      top: 10px;
      right: 6px;
      transition: rotate 200ms;
    }
  }
}

details[open] ~ .input-error-outside {
  visibility: hidden;
}

details[open] > summary::after {
  content: url("../img/arrow_drop_up.svg");
}

details {
  overflow: hidden;
}

details::details-content {
  background-color: transparent;
  block-size: 0;
  transition:
    block-size 300ms,
    content-visibility 300ms;
  transition-behavior: allow-discrete;
}

details[open]::details-content {
  block-size: auto;
}

@media screen and (max-width: 996px) {
  .right-panel {
    display: none;
  }

  .logo-mobile {
    display: flex;
    margin-top: 32px;
    background-color: var(--color-background-logo-mobile);
    border-radius: 16px;
  }
}

@media screen and (max-width: 576px) {
  .left-panel {
    justify-content: flex-start;
  }

  .left-panel .card {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }
}
