/*
 * CropSense login + Google reCAPTCHA visibility fix.
 * Loaded AFTER login.css so these rules intentionally override fixed viewport clipping.
 */

html,
body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page {
    min-height: 100vh;
    height: auto;
    overflow: visible;
}

.login-hero {
    min-height: calc(100vh - 52px);
    padding-top: 78px;
    padding-bottom: 42px;
}

.form-area,
.login-card,
.login-card form {
    overflow: visible;
}

.recaptcha-wrapper {
    width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 14px;
    position: relative;
    z-index: 2;
}

.recaptcha-wrapper .g-recaptcha {
    transform-origin: center top;
}

.recaptcha-config-error {
    margin: 4px 0 14px;
    text-align: center;
}

.sign-in-btn {
    position: relative;
    z-index: 2;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-height: 820px) and (min-width: 900px) {
    .login-hero {
        padding-top: 62px;
        padding-bottom: 30px;
    }

    .login-card {
        padding-top: 52px;
        padding-bottom: 14px;
    }

    .card-heading span {
        margin-bottom: 8px;
    }

    .form-field {
        margin-bottom: 8px;
    }

    .login-options {
        margin-bottom: 8px;
    }

    .recaptcha-wrapper {
        min-height: 70px;
        margin-bottom: 8px;
    }

    .recaptcha-wrapper .g-recaptcha {
        transform: scale(0.90);
    }

    .security-note {
        margin-top: 7px;
    }
}

@media (max-width: 760px) {
    .login-page {
        min-height: 100dvh;
        padding-bottom: 24px;
    }

    .login-hero {
        min-height: auto;
        padding-top: 0;
        padding-bottom: 24px;
    }

    .recaptcha-wrapper {
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .recaptcha-wrapper {
        min-height: 66px;
    }

    .recaptcha-wrapper .g-recaptcha {
        transform: scale(0.84);
    }
}
