/* keycloak.v2 */

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

.pf-v5-c-login {
    flex: 1;
}

.pf-v5-c-login__main {
    background: transparent; 
    box-shadow: none;
}

/* 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(--pf-v5-global--BackgroundColor--300);
    background-size: cover;
    height: 100%;
}

#kc-header {
    display: none;
}

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

.kc-login-tooltip .kc-tooltip-text{
    top:-3px;
    left:160%;
    background-color: var(--pf-v5-global--BackgroundColor--300);
    visibility: hidden;
    color: var(--pf-v5-global--icon--Color--dark);

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

#kc-code pre code {
    word-break: break-all;
}

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

/* =========================
   CZZ Customization
========================= */

:root {
    --pf-v5-global--primary-color--100: #0081a9;
    --pf-v5-global--primary-color--200: #0e6687;
    --pf-v5-global--primary-color--300: #0081a9;
    --pf-v5-global--primary-color--dark-100: #0e6687;
    --pf-v5-global--active-color--100: #17a2cc;
    --pf-v5-global--link--Color: #0081a9;
    --pf-v5-global--link--Color--hover: #0e6687;
    --pf-v5-global--link--Color--dark: #0081a9;

    --pf-v5-global--BackgroundColor--dark-100: #007ba5;
    --pf-v5-global--BackgroundColor--dark-300: #0095c3;

    --pf-v5-global--BackgroundColor--dark-200: #28b3de;
    --pf-v5-global--BackgroundColor--dark-400: #15abd8;
    --pf-v5-global--BorderColor--200: #15abd8;

    --czz-border-radius: 0.4rem;
}

/* Buttons */

.pf-v5-c-button.pf-m-primary, .pf-v5-c-button.pf-m-secondary {
    padding: 0.65rem;
    border-radius: var(--czz-border-radius);
}

/* Links */

a:hover {
    text-decoration: none;
}

/* Inputs */

input,
select,
textarea {
    border-radius: var(--czz-border-radius);
    border: 1px solid #dcdfe4;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 1rem;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #b8bec8;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--pf-v5-global--active-color--100);
    box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.15);
}

/* =========================
   AUTHENTICATION LAYOUT
========================= */

.kc-czz-auth-layout {
    display: flex;
    align-items: stretch;
}

.kc-czz-auth-brand-panel {
    flex: 1;
    position: sticky;
    top: 0;

    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background-image: url('../img/brand-bg.jpg');
    background-size: cover;
    background-position: center;

    color: white;
}

.kc-czz-auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;

    background: var(--pf-v5-global--primary-color--100);
    opacity: 0.72;

    z-index: 1;
}

.kc-czz-auth-brand-panel-inner {
    position: relative;
    z-index: 2;

    text-align: center;
    line-height: 5rem;

    padding: 0 2rem;
}

.kc-czz-auth-brand-panel-logo {
    display: flex;
    justify-content: center;
}

.kc-czz-logo {
    width: 30rem;
    height: auto;
    filter: brightness(0) invert(1);
}

.kc-czz-auth-brand-panel-quote {
    margin-top: 1rem;
    font-size: 3.25rem;
    line-height: 4rem;
    font-weight: bold;
}

.kc-czz-auth-layout > .kc-login,
.kc-czz-auth-layout > .pf-v5-c-login,
.kc-czz-auth-layout > div:first-child {
    flex: 1;
    min-height: 100vh;
}

.kc-czz-auth-layout .kc-login {
    background: white;
}

/* Mobile Responsive */

@media (max-width: 768px) {

    .kc-czz-auth-layout {
        flex-direction: column;
    }

    /* BRAND PANEL -> TOPBAR */
    .kc-czz-auth-brand-panel {
        position: sticky;
        top: 0;
        z-index: 1000;

        width: 100%;

        flex: 0 0 auto;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0 1rem;

        overflow: hidden;
    }

    .kc-czz-auth-brand-panel::before {
        opacity: 0.6;
    }

    .kc-czz-auth-brand-panel-inner {
        line-height: 1;
        padding: 0;
    }

    .kc-czz-logo {
        width: 15rem;
        height: auto;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .kc-czz-auth-brand-panel .kc-czz-auth-brand-panel-quote {
        margin-top: 0.05rem;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        line-height: 1rem;
        font-weight: bold;
    }

    .kc-czz-auth-layout > .kc-login,
    .kc-czz-auth-layout > .pf-v5-c-login,
    .kc-czz-auth-layout > div:first-child {
        min-height: auto;
    }
}