/* ==========================================================================
   Login / Register popup (ComplianceIQ) - #login-register-popup
   Colours: navy #184b71 (brand), ink #12263a, body #374151, muted #6b7280,
            lines #dfe5ec, field fill #f7f9fc, action orange #ee6331
   Materialize and the site's .login-modal styles apply here, so sizing and
   input rules are scoped to the popup id and use !important where needed.
   ========================================================================== */

#login-register-popup.lp-modal {
    width: 880px !important;
    max-width: calc(100% - 24px) !important;
    max-height: 92vh !important;
    top: 4% !important;
    overflow-y: auto;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3) !important;
}

    #login-register-popup .lp-content {
        position: relative;
        padding: 0 !important;
    }

/* Two columns: navy social panel (left) + forms (right) */
#login-register-popup .lp-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100%;
}

#login-register-popup .lp-side {
    display: flex;
    align-items: center;
    padding: 36px 28px;
    border-right: 1px solid #e3e8ef;
    /* Soft pastel mesh: peach (top-left), periwinkle (right), mint (bottom) over off-white */
    background: radial-gradient(circle at 15% 12%, #ffe1cf 0%, rgba(255, 225, 207, 0) 45%),
                radial-gradient(circle at 90% 35%, #dde4ff 0%, rgba(221, 228, 255, 0) 50%),
                radial-gradient(circle at 25% 92%, #d3f5e4 0%, rgba(211, 245, 228, 0) 48%),
                #f8fafc;
}

#login-register-popup .lp-main {
    padding: 32px 32px 26px;
}

/* Close button */
#login-register-popup .lp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f4f8;
    color: #4b5563;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

    #login-register-popup .lp-close:hover,
    #login-register-popup .lp-close:focus {
        background: #e3e8ef;
        color: #12263a;
        outline: none;
    }

/* Header */
#login-register-popup .lp-header {
    margin-bottom: 20px;
    padding-right: 36px;
}

#login-register-popup .lp-title {
    margin: 0 0 4px !important;
    color: #12263a !important;
    font-size: 24px !important;
    font-weight: 700;
    line-height: 1.3 !important;
    text-align: left !important;
}

#login-register-popup .lp-subtitle {
    margin: 0 !important;
    color: #6b7280 !important;
    font-size: 14px;
    text-align: left !important;
}

/* Tabs */
#login-register-popup .lp-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: 12px;
    background: #e2e8f0;
}

#login-register-popup .lp-tab {
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

    #login-register-popup .lp-tab:hover {
        color: #12263a;
    }

    #login-register-popup .lp-tab.lp-tab--active {
        background: #184b71;
        box-shadow: 0 2px 6px rgba(24, 75, 113, 0.35);
        color: #fff;
    }

    #login-register-popup .lp-tab:focus {
        outline: none;
    }

/* Social login (navy side panel): stacked white buttons */
#login-register-popup .lp-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#login-register-popup .lp-social__heading {
    margin-bottom: 2px;
    color: #184b71;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#login-register-popup .lp-social__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
    color: #1f2937 !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    #login-register-popup .lp-social__btn:hover {
        border-color: #c3ccd7;
        box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
        transform: translateY(-1px);
    }

    #login-register-popup .lp-social__btn i.fa {
        float: none;
        width: 20px;
        margin: 0;
        font-size: 18px;
        text-align: center;
    }

#login-register-popup .lp-social__btn--facebook i.fa { color: #1877f2; }
#login-register-popup .lp-social__btn--google i.fa { color: #ea4335; }
#login-register-popup .lp-social__btn--linkedin i.fa { color: #0a66c2; }

/* Alerts */
#login-register-popup .lp-alert {
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid #f5c2c0;
    border-left: 4px solid #d64545;
    border-radius: 8px;
    background: #fdf2f2;
    color: #9b1c1c;
    font-size: 14px;
    line-height: 1.5;
}

/* Fields */
#login-register-popup .lp-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#login-register-popup .lp-field {
    margin-bottom: 14px;
}

    #login-register-popup .lp-field label {
        display: block;
        position: static !important;
        margin-bottom: 6px;
        transform: none !important;
        color: #374151 !important;
        font-size: 14px !important;
        font-weight: 600;
    }

#login-register-popup .lp-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

#login-register-popup .lp-link {
    color: #184b71 !important;
    font-size: 13px;
    font-weight: 600;
}

    #login-register-popup .lp-link:hover {
        text-decoration: underline !important;
    }

#login-register-popup .lp-input {
    position: relative;
    display: flex;
    align-items: center;
}

    #login-register-popup .lp-input > i.fa {
        position: absolute;
        left: 13px;
        z-index: 1;
        float: none;
        width: auto;
        margin: 0;
        color: #9aa3ae;
        font-size: 15px;
        pointer-events: none;
    }

    #login-register-popup .lp-input input {
        box-sizing: border-box !important;
        width: 100% !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 12px 0 38px !important;
        border: 1px solid #dfe5ec !important;
        border-radius: 10px !important;
        background: #f7f9fc !important;
        box-shadow: none !important;
        color: #12263a !important;
        font-size: 15px !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

        #login-register-popup .lp-input input::placeholder {
            color: #a0a8b3;
        }

        #login-register-popup .lp-input input:focus {
            border-color: #184b71 !important;
            background: #fff !important;
            box-shadow: 0 0 0 3px rgba(24, 75, 113, 0.15) !important;
        }

        #login-register-popup .lp-input input#LoginPassword,
        #login-register-popup .lp-input input#RegisterPassword {
            padding-right: 44px !important;
        }

#login-register-popup .lp-input__toggle {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    cursor: pointer;
}

    #login-register-popup .lp-input__toggle:hover,
    #login-register-popup .lp-input__toggle:focus {
        background: #eef2f6;
        color: #184b71;
        outline: none;
    }

/* MVC validation messages */
/* md-redesign.css makes .field-validation-error position:absolute; keep each message under its own field */
#login-register-popup .field-validation-error {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
}

#login-register-popup .lp-field .field-validation-error {
    display: block;
    margin-top: 5px;
    color: #c53030;
    font-size: 13px;
}

#login-register-popup .lp-input input.input-validation-error {
    border-color: #e57373 !important;
    background: #fff8f8 !important;
}

/* Terms checkbox and reCAPTCHA, one below the other, no panel */
#login-register-popup .lp-verify {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin: 4px 0 18px;
    padding: 0;
    border: 0;
    background: none;
}

/* Terms checkbox (Materialize filled-in style kept) */
#login-register-popup .lp-check {
    margin: 0;
}

    #login-register-popup .lp-check label {
        display: block;
        margin: 0;
    }

    /* Keep "I agree to the Terms of Service" on one line; the panel wraps the reCAPTCHA below if there's no room */
    #login-register-popup .lp-check label span {
        padding-left: 30px !important;
        color: #374151 !important;
        font-size: 14px !important;
        line-height: 20px !important;
        white-space: nowrap;
    }

    #login-register-popup .lp-check label a {
        color: #184b71 !important;
        font-weight: 600;
        text-decoration: underline !important;
    }

/* reCAPTCHA renders at a fixed 304x78; scale to 80% (~243x62) and reserve only that space */
#login-register-popup .lp-captcha {
    flex: 0 0 auto;
    width: 244px;
    height: 62px;
}

    #login-register-popup .lp-captcha .g-recaptcha {
        display: inline-block;
        transform: scale(0.8);
        transform-origin: 0 0;
    }

/* Submit */
#login-register-popup .lp-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin: 4px 0 14px;
    border: 0;
    border-radius: 10px;
    background: #ee6331;
    box-shadow: 0 6px 18px rgba(238, 99, 49, 0.3);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    #login-register-popup .lp-submit:hover,
    #login-register-popup .lp-submit:focus {
        background: #d9541f;
        box-shadow: 0 8px 22px rgba(238, 99, 49, 0.38);
        outline: none;
        transform: translateY(-1px);
    }

#login-register-popup .lp-switch {
    margin: 0 !important;
    color: #6b7280 !important;
    font-size: 14px;
    text-align: center !important;
}

    #login-register-popup .lp-switch a {
        color: #184b71 !important;
        font-weight: 700;
    }

        #login-register-popup .lp-switch a:hover {
            text-decoration: underline !important;
        }

/* Tablets and phones: social panel moves to the top, buttons in one row */
@media only screen and (max-width: 767px) {
    #login-register-popup .lp-layout {
        grid-template-columns: 1fr;
    }

    #login-register-popup .lp-side {
        padding: 20px 18px;
        border-right: 0;
        border-bottom: 1px solid #e3e8ef;
    }

    #login-register-popup .lp-social {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    #login-register-popup .lp-social__heading {
        grid-column: 1 / -1;
        padding-right: 40px; /* keep clear of the close button */
    }

    #login-register-popup .lp-social__btn {
        justify-content: center;
        padding: 0 8px;
    }

        /* Icon-only buttons on narrow screens; text stays available to screen readers */
        #login-register-popup .lp-social__btn span {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }

    #login-register-popup .lp-main {
        padding: 22px 20px 20px;
    }

    #login-register-popup .lp-header {
        padding-right: 0;
    }
}

@media only screen and (max-width: 480px) {
    #login-register-popup .lp-title {
        font-size: 21px !important;
    }

    #login-register-popup .lp-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
