/******************************************************************************
 LAYOUT
 ***/
.page-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    z-index: 1;
}

.login-pane, .logo-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.login-card {
    height: fit-content;
    display: block;
    overflow-y: auto;
    width: 100%;
    max-width: unset;
    padding: 48px;
}

.login-card > * {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.logo-pane {
    justify-content: flex-start;
}

.logo-pane .gradient-background {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 0;
}

.logo-pane .logo {
    margin-top: 33%;
    padding: 0;
    width: 70%;
    z-index: 10;
}

.logo-pane .logo img {
    width: auto;
    height: 100%;
}

.bottom-texture {
    position: fixed;
    z-index: 10;
    bottom: 0;
    left: 50%;
    right: 0;
    height: 25%;

    /*background-image set in HTML for urlResource variable*/
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    mix-blend-mode: multiply;
}

#footer-links {
    margin-top: 48px;
    width: 100%;
    text-align: center;
}

#website-link {
    margin-top: 12px;
    text-align: center;
}

#homepage-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    margin-top: 24px;
}

#homepage-links div {
    width: 50%;
    padding: 0 12px;
}

#homepage-links div:not(:last-of-type) {
    border-right: 1px solid #747274;
}

#homepage-links div:first-of-type {
    text-align: right;
}

#homepage-links div:last-of-type {
    text-align: left;
}

#footer-links a {
    color: var(--qc-login-link);
}

#footer-links a:hover,
#footer-links a:focus {
    color: var(--qc-login-link-hover);
}

#always-free-mobile-register {
    display: none;
}

/* PatternFly's `iframe { height: auto }` reset outranks the widget's height="78" attribute, so the
   anchor iframe stretches to the 150px iframe default and spills its blank canvas over the row below.
   Clip it to the box Google sized rather than hardcoding a height that changes with data-size. */
.g-recaptcha > div {
    overflow: hidden;
}

#always-free {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    z-index: 10;
    width: 70%;
    margin-top: 48px;
    line-height: 1.4;
    padding: 8px 16px 16px;
    border-radius: 4px;
}

#always-free .title {
    text-align: center;
}

.pf-c-alert {
    margin-bottom: 12px;
}

#kc-registration {
    font-size: 20px;
}

#kc-registration a {
    font-weight: 700;
}

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

hr {
    visibility: hidden;
}

/* PF v3 gives h2 weight 300 and a 20px top margin where h4 gets 500 and 10px. */
.kc-social-section > h2,
.kc-social-section > h4 {
    font-size: 12px;
    font-weight: 500;
    margin: 10px 0;
    text-align: center;
}

.login-card .pf-m-block {
    width: 320px;
    margin: auto;
}

#input-error::before {
    content: "⚠";
}

#input-error {
    margin-left: 8px;
    font-weight: 700;
    font-size: 16px;
}

#input-error,
#input-error::before {
    color: red;
}

@media (max-width: 960px) {
    .page-container {
        flex-direction: column-reverse;
    }

    #always-free {
        display: none;
    }

    #always-free-mobile-register {
        display: block;
        background-color: #DFDFE7;
        z-index: 10;
        margin: 0 -4px 24px;
        line-height: 1.4;
        padding: 8px 16px 8px;
        border-radius: 4px;
    }

    #always-free-mobile-register .title {
        margin-top: 8px;
    }

    .login-pane, .logo-pane {
        width: 100%;
    }

    .login-pane {
        height: unset;
        flex-grow: 1;
    }

    .logo-pane {
        height: 80px !important;
        justify-content: center;
    }

    .login-card {
        padding-top: 64px;
        padding-bottom: 32px !important;
    }

    .logo-pane .logo {
        height: 60%;
        width: unset;
        margin: 0;
    }

    .bottom-texture {
        display: none;
    }
}

/******************************************************************************
 BRANDING
 ***/

#kc-form-options {
    margin-bottom: 32px;
}

/******************************************************************************
 LIGHT / DARK
 Vars live in qc_styles.common — these are the login-only surfaces, and they have to sit in this
 file because it loads after common and would otherwise win with the light values.
 ***/
.kc-social-section > h2,
.kc-social-section > h4,
#kc-registration,
#footer-links {
    color: var(--qc-login-text);
}

#homepage-links div:not(:last-of-type) {
    border-right-color: var(--qc-login-border);
}

@media (max-width: 960px) {
    #always-free-mobile-register {
        background-color: var(--qc-login-mobile-banner);
        color: var(--qc-login-text);
    }
}
