﻿*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--shared-ui-theme-body-background);
    font-family: "Nunito", sans-serif;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 1rem;
}

.auth-box {
    display: flex;
    overflow: hidden;
    max-width: 850px;
    width: 100%;
    position: relative;
}

.auth-brand,
.auth-content {
    flex: 1 1 50%;
    min-width: 0; /* allow flex items to shrink below content size (Safari treats default min-width:auto differently) */
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .auth-brand img {
        width: 250px;     /* deterministic width so Safari doesn't size the column from the image's intrinsic dimensions */
        max-width: 100%;  /* never exceed the brand column */
        height: auto;
    }

.auth-content {
    flex-direction: column;
    text-align: left;

    /*  Paired with --shared-ui-theme-body-background, because this panel sits directly ON that background
        with no surface of its own. It used to hardcode charcoal (#414042), which is invisible on the Rush
        portals' black ground — the heading only escaped because the layout inlined color:#fff on it, and no
        page had ever put body text here to expose the rest. Fallback keeps charcoal for any portal whose
        theme predates the token. */
    color: var(--shared-ui-theme-body-foreground, var(--gigafy-charcoal));
}

    .auth-content h2 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .auth-content form {
        width: 100%;
        max-width: 100%;
    }

    .auth-content .form-control {
        width: 100%;
        padding: 0.5rem 0.75rem;
        font-size: 16px; /* prevents iOS zoom on focus */
        border-radius: 6px;
        margin-bottom: 1rem;
        -webkit-appearance: none;
        appearance: none;
    }

        .auth-content .form-control:focus {
            outline: none;
            box-shadow: none;
            border-color: var(--shared-ui-theme-button-border-color);
        }

    .auth-content button[type="submit"] {
        background-color: var(--shared-ui-theme-button-background);
        color: white;
        padding: 0.75rem;
        font-size: 1rem;
        border: none;
        border-radius: 6px;
        width: 100%;
        transition: background 0.2s ease;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
    }

        .auth-content button[type="submit"]:hover {
            background-color: var(--shared-ui-theme-button-hover-background-color);
            color: var(--shared-ui-theme-button-hover-foreground-color);
        }

.auth-box::before {
    content: "";
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 50%;
    width: 1px;
    background: var(--shared-ui-theme-seperator);
    z-index: 1;
}

.password-wrapper {
    position: relative;
}

    .password-wrapper .form-control {
        padding-right: 4rem;
    }


@media (max-width: 768px) {
    .auth-box {
        flex-direction: column;
        box-shadow: none;
    }

        .auth-box::before {
            content: none;
        }

    .auth-brand,
    .auth-content {
        flex: 1 1 100%;
        padding: 1.5rem;
    }

        .auth-brand img {
            width: 200px;
            max-width: 100%;
        }
}

.alert-danger {
    padding: 10px;
    width: 100%;
    text-align: center;
}


.forgot-link-btn {
    font-size: 0.9rem;
    color: var(--shared-ui-theme-forgotten-btn-foreground);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-decoration: none;
    cursor: pointer;
}

a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: var(--shared-ui-theme-button-background);
    color: #fff;
    border: none;
    cursor: pointer;
}

    a.btn:hover {
        background-color: var(--shared-ui-theme-button-hover-background-color);
        color: var(--shared-ui-theme-button-hover-foreground-color);
    }
