body {
    font-size: 100%;
}

.login-pf {
    background: none;
}


.login-pf body {
    background: #fff;
    height: 100%;
}

a {
    text-decoration: underline;
    font-weight: var(--pf-global--link--FontWeight);
    color: var(--pf-global--link--Color);
    text-decoration: var(--pf-global--link--TextDecoration);
}

a:hover {
    color: var(--pf-global--link--Color--hover);
}

.h1, .h2, h1, h2 {
    font-weight: bold;
    color: var(--gedisa-brand);
}

.pficon {
    color: var(--gedisa-brand);
}

.alert-error {
    background-color: #ffffff;
    border-color: var(--gedisa-error);
    color: #333333;
}

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

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

.pf-c-dropdown {
    font-size: 0.875rem;
}

.pf-c-dropdown__menu-item {
    text-decoration: none;
}

#kc-locale ul li a {
    color: var(--pf-c-dropdown__menu-item--Color);
    background: var(--pf-c-dropdown__menu-item--BackgroundColor);
}

#kc-locale ul li a:hover {
    color: var(--pf-c-dropdown__menu-item--hover--Color);
    background: var(--pf-c-dropdown__menu-item--hover--BackgroundColor);
}

.pf-c-dropdown__menu-item,
.pf-c-dropdown__menu-item:hover,
a.pf-c-dropdown__menu-item:hover,
.pf-c-dropdown__menu-item:focus {
    --pf-c-dropdown__menu-item--hover--Color: var(--gedisa-brand--light);
    --pf-c-dropdown__menu-item--hover--BackgroundColor: transparent;
    --pf-c-dropdown__menu-item--BackgroundColor: transparent;
    --pf-c-dropdown__menu-item--Color: var(--gedisa-brand);
}

a#kc-current-locale-link {
    display: block;
    padding: 0 1rem 0 0;
    text-align: right;
    text-decoration: none;
    position: relative;
}

a#kc-current-locale-link::after {
    content: "";
    margin-left: 4px;
    width: 0;
    height: 0;
    border-left: 0.33rem solid transparent;
    border-right: 0.33rem solid transparent;
    border-top: 0.33rem solid currentColor;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(calc(50% + 0.33rem * -1));
}

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

#kc-logo {
    width: 100%;
}

#kc-logo-wrapper {
    background-image: url(../img/keycloak-logo-2.png);
    background-repeat: no-repeat;
    height: 63px;
    width: 300px;
    margin: 62px auto 0;
}

div.kc-logo-text {
    background-image: url(../img/gedisa.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    height: 63px;
    width: 300px;
    max-width: 80%;
    margin: 0 auto;
}

div.kc-logo-text span {
    display: none;
}

.select-auth-box-parent-nohover {
    cursor: pointer;
    align-items: center;
    pointer-events: none;
}

.select-auth-box-parent {
    cursor: pointer;
    align-items: center;
}

.select-auth-box-parent:hover {
    color: var(--gedisa-brand);
}

#kc-select-try-another-way-form {
    padding-top: 1rem;
}

/*
    Note: Here be dragons. Most of the following styles seem obsolete.
    Tests within the actual environment needed.
*/

#kc-header {
    color: #ededed;
    overflow: visible;
    white-space: nowrap;
}

#kc-content {
    width: 100%;
}

#kc-info {
    padding-bottom: 200px;
    margin-bottom: -200px;
}

#kc-info-wrapper {
    font-size: 0.875rem;
}

#kc-form-options span {
    display: block;
    margin-bottom: 0.5rem;
}

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

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

#kc-registration {
    margin-bottom: 15px;
}

/* TOTP */

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;
}

.card-pf {
    background: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
}

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

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

#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: 0;
}

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

form#kc-select-back-form div.login-pf-social-section {
    padding-left: 0;
    border-left: 0;
}

#kc-page-title {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Webauthn */
#kc-webauthn-authenticator {
    padding: 0 20px;
}

/* Addons GEDISA */

.margin-top {
    margin-top: 20px;
}

form > .instruction {
    margin-bottom: var(--pf-global--spacer--md);
    color: var(--pf-global--Color--200);
}

.form-buttons {
    margin-top: var(--pf-global--spacer--md);
}

.form-buttons.pf-l-flex > .pf-c-button {
    flex-grow: 1;
}

.form-buttons > a.pf-c-button {
    text-decoration: none;
}

a.pf-c-button.pf-m-primary,
a.pf-c-button.pf-m-secondary {
    text-decoration: none;
}

/* undoing .form-group margins when wrapped */
.form-group > .form-buttons {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: -15px;
}

.select-auth-container.pf-l-stack {
    gap: var(--pf-global--spacer--sm);
}

.select-auth-container {
    color: var(--pf-global--Color--200);
}

.select-auth-container .pf-c-title {
    font-weight: var(--pf-global--FontWeight--bold);
    color: var(--pf-global--Color--100);
}

/* KC common fixes */

/* fix block button wrapped in form after block button, eg in webauthn register */
.pf-c-button.pf-m-block + form {
    margin-top: var(--pf-global--spacer--sm);
}

/* clear float-left, eg in .form-buttons after #kc-form-options */
.col-xs-12 + .pf-l-flex,
.col-xs-12 + .pf-l-stack {
    clear: left;
    padding-top: var(--pf-global--spacer--sm);
}

.iam-checkbox .pf-c-switch.pf-m-reverse {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.iam-checkbox .pf-c-switch__label {
    max-width: 70%;
}

/* fix button wrapped in form next to other button inside .form-buttons, eg #registerWebAuthn */
.form-buttons.pf-l-flex > form {
    flex-grow: 1;
}

.form-buttons.pf-l-flex > form > .pf-c-button {
    width: 100%;
}

/* fix dislocated .form-group negative margins in webauthn-authenticate.ftl */
#kc-form-webauthn > div.form-group {
    margin-left: 0;
    margin-right: 0;
}


.auth-icon {
    width: 6em;
    display: flex;
    justify-content: center;
    max-width: 3em;
}