:root {
    --keycloak-bg-logo-url: url("../img/keycloak-bg.png");
    align-content: center;
    background-size: cover;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.pf-v5-c-login__container {
    grid-template-columns: 34rem;
    grid-template-areas: "header"
                         "main"
}

.pf-v5-c-login__main-header {
    border-top: 4px solid var(--keycloak-card-top-color);
}

/* Info section - top margin + bottom padding */
.pf-v5-c-login__main-footer-band:first-child {
    margin-block-start: var(--pf-v5-global--spacer--lg);
}

.pf-v5-c-login__main-footer-band:last-child {
    padding-bottom: 0;
}

/* Info section */

.login-pf body {
    background: var(--keycloak-bg-logo-url) no-repeat center center fixed;
    background-size: cover;
    height: 100%;
}

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

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

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

#kc-recovery-codes-list {
    columns: 2;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}

#kc-verify-email-form {
    margin-top: 24px;
    margin-bottom: 24px;
}

#kc-header-wrapper {
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2em;
    white-space: normal;
    color: var(--pf-v5-global--Color--light-100) !important;
    text-align: center;
}

hr {
    margin-top: var(--pf-v5-global--spacer--sm);
    margin-bottom: var(--pf-v5-global--spacer--md);
}

#kc-social-providers svg:not(.google) {
    filter: invert(47%) sepia(88%) saturate(7486%) hue-rotate(199deg) brightness(91%) contrast(101%);
}

#kc-social-providers svg {
    height: var(--pf-v5-global--FontSize--xl);
}

@media (prefers-color-scheme: dark) {
    #kc-social-providers svg:not(.google) {
        filter: invert(54%) sepia(96%) saturate(2028%) hue-rotate(174deg) brightness(99%) contrast(97%);
    }
}

@media (min-width: 768px) {
    div.pf-v5-c-login__main-header {
        grid-template-columns: 70% 30%;
    }
}

.pf-v5-c-login__main {
    height: 100%;
    align-content: center;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    margin-bottom: 2rem;
}

.login-logo-container img {
    max-height: 6rem;
    min-height: 4rem;
}

#kc-card {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    position: relative;
    width: fit-content;
    max-width: 50%;
    height: 50%;
    background-color: white;
    border: 1px solid lightgray;
    padding: 3rem;
}

/* Buttons Styling */
.login-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-primary {
    min-width: 400px;
    width: 100%;
    background-color: #48994D;
    color: white;
    border: none;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    padding: 1.5rem;
    margin: 2rem;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #27612B;
}

/* Eingabefelder */
.form-group {
    margin-bottom: 1rem;
}

input.form-control {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Formular einblenden */
#kc-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    border-color: #333;
}

.pf-v5-c-helper-text__item-text {
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
    color: #6a6e73;
}

.pf-m-error {
    color: #c9190b !important;
}

.kc-feedback-text {
    margin-top: 0.25rem;
}

.kc-password-toggle-button {
    background: none;
    line-height: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.6rem;
    position: relative;
    justify-self: flex-end;
    align-self: flex-end;
    color: #6a6e73;
    font-size: 1rem;
}

.kc-password-toggle-button:hover {
    color: #000;
}

.kc-form-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #151515;
}

.kc-logo-text {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: white;
}

.kc-form-options-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6a6e73;
}

.kc-form-options-wrapper a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.kc-form-options-wrapper a:hover {
    color: #004080;
    text-decoration: underline;
}
