/* WealthSolutions login.css — tenant-specific brand of the generic split-panel
 * login template. Same structure as the Flanks variant we replaced (left hero,
 * right form, top-left logo, modal styles), but swapped to the WS palette
 * (#088dd5 brand-blue / #066ca6 hover) and the WS logo + cover image already
 * present in /custom/images/.
 *
 * Ship this file as /custom/Content/login.css on the WealthSolutions tenant.
 * Reference copy kept here as login_wealthsolutions.css so future redeploys
 * don't have to reconstruct it from scratch.
 */

/* Opt out of Chrome Android's "Auto dark mode for web contents" by declaring
 * we serve only the light scheme. Without this, Chrome (and some OEM browsers
 * — notably OnePlus / OxygenOS) inverts every page, even in incognito, and
 * the user can't get back to light mode short of toggling a hidden flag. */
:root { color-scheme: light; }

.logo {
    background-color: #222;
    padding: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #fff;
}

/* Layout structure */
#login-wrapper {
    display: flex;
    min-height: 100vh;
}

#core-login-container {
    display: block;
    width: 50%;
    margin: 0;
    padding: 0;
}

.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#loginForm {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form {
    padding-top: 100px;
    width: 400px;
}

/* Left hero panel — pure CSS gradient, no photo. The previous
 * ws_cover_watermark.jpg was a report-watermark image (foggy mountains) that
 * read as low-effort stock. A two-stop diagonal gradient in WS blues feels
 * premium, loads instantly, and renders consistently across devices. The
 * decorative sparkle in the corner ties it back to the brand mark. */
.left-panel {
    width: 50%;
    position: relative;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, #088dd5 0%, #066ca6 45%, #044a73 100%);
    overflow: hidden;
}

    /* Decorative oversized sparkle in the bottom-right of the hero. Uses the
     * portal-logo.svg (sparkle-only variant) at low opacity so the wordmark
     * in the top-left stays the focal point. */
    .left-panel::after {
        content: '';
        position: absolute;
        right: -60px;
        bottom: -80px;
        width: 480px;
        height: 480px;
        background-image: url('/custom/Content/portal-logo.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        opacity: 0.08;
        pointer-events: none;
    }

.right-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* WS logo over the hero. The white/light-on-dark variant of the WealthSolutions
 * wordmark sits in the top-left so it reads against the dark overlay. */
.logo-container {
    position: absolute;
    top: 28px;
    left: 28px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo-box {
    width: 220px;
    height: 56px;
    margin-right: 10px;
    background-image: url('/custom/images/logo-wealth_dark.svg');
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
}

.logo-text {
    color: white;
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: bold;
}

/* Top-right button (block / contact) — outline pill in WS blue */
.block-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid #088dd5;
    border-radius: 50px;
    padding: 6px 16px;
    color: #088dd5;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .block-button:hover {
        background-color: #066ca6;
        color: white;
        border-color: #066ca6;
    }

/* Hide the original Pivolt header logo so only the branded one shows */
.logo {
    display: none !important;
}

h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: normal;
    text-align: center;
    color: #044a73;
}

/* Form inputs */
.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #d6e6f2;
    border-radius: 4px;
    font-size: 16px;
    background-color: transparent;
}

    .form-control:focus {
        outline: none;
        border-color: #088dd5;
    }

        .form-control:focus::placeholder,
        .form-control:not(:placeholder-shown)::placeholder {
            color: transparent;
        }

        @keyframes onAutoFillStart { from { /**/ } to { /**/ } }
        input:-webkit-autofill { animation-name: onAutoFillStart; }

        /* Use ~ (general sibling) instead of + so password-manager-injected
           icons between the input and the floating-label don't break selector. */
        .form-control:focus ~ .floating-label,
        .form-control:not(:placeholder-shown) ~ .floating-label,
        .form-control:-webkit-autofill ~ .floating-label,
        .form-control.autofilled ~ .floating-label {
            top: -10px;
            left: 10px;
            font-size: 12px;
            padding: 0 5px;
            background-color: white;
            color: #088dd5;
        }

.floating-label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #6ba8d4;
    font-size: 16px;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Password toggle */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6ba8d4;
    font-size: 18px;
    z-index: 1;
    transition: color 0.2s ease;
}

    .toggle-password:hover {
        color: #088dd5;
    }

/* Submit button — primary WS blue */
#submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #088dd5;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

    #submit-btn:hover {
        background-color: #066ca6;
    }

/* Form footer links */
.form-footer {
    display: flex !important;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    visibility: visible;
}

    .form-footer a {
        color: #088dd5;
        text-decoration: none;
        font-size: 14px;
    }

        .form-footer a:hover {
            color: #066ca6;
            text-decoration: underline;
        }

.separator {
    color: #6ba8d4;
    font-size: 14px;
}

/* Footer disclaimer */
.disclaimer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    font-size: 12px;
    color: #044a73;
    text-align: center;
    border-top: 1px solid #d6e6f2;
    background-color: white;
}

.disclaimer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

    .disclaimer-links a {
        color: #088dd5;
        text-decoration: none;
        font-size: 12px;
    }

        .disclaimer-links a:hover {
            color: #066ca6;
        }

.disclaimer-text {
    max-width: 800px;
    margin: 0 auto;
}

/* Validation messages */
.field-validation-message {
    color: #d32f2f;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.validation-summary {
    color: #d32f2f;
    margin-bottom: 20px;
}

    .validation-summary ul {
        list-style: none;
        padding-left: 0;
    }

/* Mobile-only WS logo above the form. We tint the existing white SVG via
 * CSS `mask-image` — saves shipping a separate blue SVG just to recolour.
 * The mask uses the shape of the wordmark (sparkle + "WEALTH SOLUTIONS");
 * the background-color shows through as the visible "fill". Element ratio
 * matches the SVG viewBox (231:117) so the wordmark isn't squished. */
.ws-mobile-logo {
    width: 200px;
    height: 102px;
    margin: 12px auto 24px;
    background-color: var(--ws-brand-blue, #088dd5);
    -webkit-mask-image: url('/custom/images/logo-wealth_dark.svg');
            mask-image: url('/custom/images/logo-wealth_dark.svg');
    -webkit-mask-size: contain;
            mask-size: contain;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}

/* Phone layout — only the login form. No hero image, no top-right link,
 * no logo box. The custom_login.js companion already skips injecting the
 * left panel on phones; these rules guarantee nothing leaks through if
 * an older cached JS version still creates them. */
@media (max-width: 768px) {
    #login-wrapper {
        flex-direction: column;
    }

    .left-panel,
    #core-login-container,
    .block-button,
    .logo-container,
    .logo-box {
        display: none !important;
    }

    .right-panel {
        width: 100%;
        min-height: 100vh;
        justify-content: center;
    }

    .login-container {
        flex: 1;
        justify-content: center;
    }

    .login-form {
        padding-top: 0;
        width: 100%;
        max-width: 360px;
    }

    #loginForm {
        padding: 16px;
    }

    .disclaimer {
        position: static;
        padding: 16px;
    }

    /* On phone the wordmark above the form is the brand cue. The "Login" h1
     * is redundant and steals vertical space. */
    .login-form h1 {
        display: none;
    }
}

/* Hide the mobile logo on desktop — it only belongs in the phone layout */
@media (min-width: 769px) {
    .ws-mobile-logo { display: none; }
}


/* Modal (terms, privacy) */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px;
    border-bottom: 1px solid #d6e6f2;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    color: #088dd5;
}

.modal-close {
    font-size: 28px;
    font-weight: 700;
    color: #6ba8d4;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .modal-close:hover {
        color: #066ca6;
    }

.modal-body {
    padding: 20px;
    line-height: 1.6;
}

    .modal-body h3 {
        font-size: 20px;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .modal-body h4 {
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .modal-body p {
        margin-bottom: 10px;
    }

    .modal-body ul {
        margin-left: 20px;
        margin-bottom: 10px;
    }

    .modal-body li {
        margin-bottom: 5px;
    }

@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 15px;
    }
}
