#login {
    background-image: url(../img/final-thoughts1.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 753px;
    display: flex;
    justify-content: space-between;
    padding: 50px;
    border-radius: 10px;
    margin-left: 10px;
    margin-right: 10px;
}

#login .container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#login .form-wrapper {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    gap: 7px;
    border-radius: 11.56px 11.56px;
    backdrop-filter: blur(15.40772533416748px);
    width: fit-content;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

#login-form {
    display: flex;
    flex-direction: column;
    width: 432px;
    border-radius: 16px 16px;
    padding: 50px 40px;
    gap: 21px;
    background-color: #FFF;
    margin-bottom: 0;
}

#login-form .login-title h2 {
    line-height: 35px;
    font-weight: 500;
    font-size: 26px;
    letter-spacing: 0;
    color: var(--v2-fg);
    font-family: var(--v2-font);
    text-align: center;
    max-width: 283px;
    margin: 0 auto;
}

#login-form .form-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#socialOptions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0px auto 0px auto;
    gap: 20px;
}

#register-form .form-body .continue-message {
    display: flex;
    flex-direction: row;
    margin: auto;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: var(--v2-font);
    font-weight: 600;
}

#login-form .content {
    display: flex;
    flex-direction: column;
    gap: 27px;
}

#login-form .form-body .form-group {
    margin-bottom: 0;
    width: 100%;
}

#login-form .form-body .form-group input.form-control:not(input.term-condition) {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0;
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 15px;
    line-height: 23px;
    letter-spacing: 0;
    width: 100%;
    appearance: textfield;
    -webkit-appearance: textfield;
    height: 30px;
}

#togglePassword {
    position: absolute;
    top: 30%;
    right: 10px;
}

#login-form a.forgot-pass-link {
    display: flex;
    line-height: 20px;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0;
    text-decoration: none;
    color: var(--link-blue);
}

#login-form p.login-summary {
    font-family: var(--v2-font);
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    margin-bottom: 0;
    margin-top: 30px;
}

#loginSubmitBtn {
    color: #FFF;
    background-color: var(--btn-color-green);
    border-color: var(--btn-color-green);
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0;
    line-height: 23px;
    padding: 24px 27px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 59px;
}

#loginSubmitBtn:hover {
    color: #FFF;
    background-color: var(--btn-color-green-hover);
    border-color: var(--btn-color-green-hover);
}

#login a.register-btn {
    height: 59px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    padding: 24px 27px;
    border-radius: 100px;
    letter-spacing: 0;
    background-color: var(--btn-color-yellow);
    border-color: var(--btn-color-yellow);
}

/* #login a.register-btn:hover {
    background-color: var(--green);
} */

#login .register-btn span {
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 16px;
    line-height: 23px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    color: var(--text-white);
}

#login .register-btn:hover {
    background-color: var(--btn-color-yellow-hover);
    border-color: var(--btn-color-yellow-hover);
}

#login .tc {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border: 0;
    justify-content: center;
    vertical-align: middle;
    align-items: center;
}

#login .tc p {
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0;
    margin: 0;
}

#login .tc input.term-condition {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

#login .tc a {
    color: var(--link-green);
}

#login .tc a:hover {
    color: var(--link-green-hover);
}

@media only screen and (max-width: 769px) {
    #login {
        background-image: url(../img/login_page_bg.jpg);
        background-size: cover;
        background-position: center;
    }
}

@media only screen and (max-width: 550px) {
    #login {
        padding: 30px 0px;
        min-height: 650px;
        margin: 0;
    }

    /* Mobile: unwind the bootstrap row/col chain so the form-wrapper can shrink
       to viewport width. Without min-width: 0 on each flex link, the intrinsic
       width of social-login buttons forces the row wider than the container. */
    #login .row {
        margin-left: 0;
        margin-right: 0;
        min-width: 0;
        max-width: 100%;
    }

    #login .col,
    #login [class*='col-'] {
        padding-left: 0;
        padding-right: 0;
        min-width: 0;
        max-width: 100%;
    }

    #login .form-wrapper {
        padding: 15px;
        gap: 5px;
        border-radius: 8.68px;
        backdrop-filter: blur(11.579329490661621px);
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #login-form {
        padding: 37.58px 30.06px;
        border-radius: 12.14px;
        gap: 15.78px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #loginSubmitBtn,
    #login a.register-btn {
        border-radius: 75.15px;
        padding: 10px 20px;
        height: 48px;
    }

    #login-form .form-body .form-group input.form-control:not(input.term-condition) {
        font-size: 16px;
    }

    #login-form .login-title h2 {
        text-align: left;
        margin-left: 0;
    }
}

@media only screen and (max-width: 460px) {
    #login {
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
    }

    #login .form-wrapper {
        border-radius: 0;
    }

    #login-form {
        border-radius: 0;
    }
}

@media only screen and (max-width: 376px) {
    #login {
        padding: 30px 5px;
    }

    #login .container {
        padding-left: 0px;
        padding-right: 0px;
    }

    #login-form {
        padding: 15px;
        border-radius: 12.14px;
        gap: 15.78px;
        width: 100%;
        max-width: none;
    }
}

/* Narrow mobile (300–359px). Squeeze the auth card padding and constrain the
   social-login widgets (Facebook iframe, Apple Sign-In, Google button) so
   they don't push the form past the viewport. The FB iframe + Apple widget
   both default to 280px; the JS in social-logins.blade.php knocks them down
   to 240 below 360 so they sit comfortably inside the form. */
@media only screen and (max-width: 359px) {
    #login {
        padding: 20px 0;
    }

    #login-form {
        padding: 18px 12px;
        gap: 12px;
    }

    #login-form .login-title h2 {
        font-size: 22px;
        line-height: 1.2;
    }

    /* Force the form-control bottom-bordered inputs / labels to stop at the
       form edge — otherwise placeholder text spills off the right. */
    #login-form .form-body .form-group {
        min-width: 0;
        max-width: 100%;
    }

    #login-form .form-body .form-group input.form-control:not(input.term-condition) {
        font-size: 16px;
        width: 100%;
        min-width: 0;
    }

    /* T&C row — its inline checkbox + "I accept ... terms & conditions" link
       wrap nicely once we drop the centre-aligned flex constraint. */
    #login .tc {
        flex-wrap: wrap;
        gap: 10px;
        row-gap: 6px;
    }

    /* All three social widgets land at 240px wide. #socialOptions is a flex
       column with align-items: center, so equal-width children align to a
       single vertical centerline. The Google SDK reads
       `googleLoginWrapper.offsetWidth` at window.onload to size its iframe,
       so constraining the wrapper to 240 propagates to the rendered button.
       Scoped under #login to outrank social-logins.css (#fbLoginWrapper:
       width 280px), which loads after this file because it's `<link>`ed
       inline in the social-logins partial body. */
    #login #socialOptions {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    #login #fbLoginWrapper,
    #login #googleLoginWrapper {
        width: 240px;
        max-width: 100%;
    }

    #login #fbSpinner {
        width: 240px;
        max-width: 100%;
    }

    #login #appleid-signin {
        width: 240px !important;
        max-width: 100%;
        margin: 0 auto;
    }

    #loginSubmitBtn,
    #login a.register-btn {
        height: 48px;
        padding: 12px 16px;
        font-size: 15px;
    }
}
