/* login.css - Ord Minnett Theme
 *
 * Palette extracted from the existing Ord Minnett client portal
 * (https://client.ords.com.au/private/assets/css/site.css).
 * Navy is the corporate brand colour; red is the signature accent.
 *
 * --primary-navy:    #002B55   brand navy       (CTA, headings, buttons)  was #244C5A
 * --dark-navy:       #001A33   hover / deep navy                            was #F94B5E
 * --accent-red:      #E91C2A   signature red accent (underlines, highlights)
 * --light-tint:      #E6EBF0   subtle navy tint (selected rows, modals)     was #9EC5E1
 * --border-light:    #C4D0DC   navy-tinted border
 * --text-dark:       #1A1A1A   near-black body text
 * --text-mid:        #626262   secondary text
 * --white:           #FFFFFF
 *
 * Typography: Montserrat (loaded by the host page).
 * Image paths use the production convention /custom/images/<file>.
 */

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

/* Reset and basic styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
}

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

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

/* Hide original container styling */
#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;
}

/* Hide original login form and display it properly in right panel */
#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;
}

/* The left panel – uses the Ord Minnett corporate banner image from the
 * existing client portal (/private/assets/img/background.jpg). */
.left-panel {
    width: 50%;
    background-image: url('/custom/images/ord_minnett_bg.jpg');
    background-color: #002B55;
    background-size: cover;
    background-position: center;
    position: relative;
}

    .left-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 43, 85, 0.35); /* Subtle Ord Minnett red overlay */
        z-index: 1;
    }

/* The right panel with form */
.right-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Logo in top left of left panel */
.logo-container {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 60%;
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo-box {
    width: 70%;
    aspect-ratio: 609 / 62;
    margin-right: 10px;
    background-image: url('/custom/images/ord_minnett_logo_wht.png');
    background-size: contain;
    background-position: center left;
    background-repeat: no-repeat;
}

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

/* Back to Home button */
.block-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid #002B55;
    border-radius: 50px;
    padding: 6px 16px;
    color: #002B55;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .block-button:hover {
        background-color: #001A33;
        color: white;
        border-color: #001A33;
    }

/* Hide original logo */
.logo {
    display: none !important;
}

/* Login header — navy title with signature red underline (matches the
 * portal's section-header styling: #002B55 with 4px #E91C2A underline). */
h1 {
    font-size: 32px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    font-weight: 500;
    color: #002B55;
    text-align: center;
    border-bottom: 4px solid #E91C2A;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

    .form-control:focus {
        outline: none;
        border-color: #002B55;
    }

        /* Floating labels using pseudo-elements */
        .form-control:focus::placeholder,
        .form-control:not(:placeholder-shown)::placeholder {
            color: transparent;
        }

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

        .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;
        }

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

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

    .toggle-password:hover {
        color: #001A33;
    }

/* Submit button */
#submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #002B55;
    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: #001A33;
    }

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

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

        .form-footer a:hover {
            color: #001A33;
            text-decoration: underline;
        }

.separator {
    color: #002B55;
    font-size: 14px;
}

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

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

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

        .disclaimer-links a:hover {
            color: #002B55;
        }

.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;
    }

/* Responsive design */
@media (max-width: 768px) {
    #login-wrapper {
        flex-direction: column;
    }

    #core-login-container,
    .left-panel {
        width: 100%;
        height: 40vh;
    }

    .right-panel {
        width: 100%;
        min-height: 60vh;
    }

    #loginForm {
        padding: 10px;
    }
}


/* Modal styles */
.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 #C4D0DC;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

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

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

    .modal-close:hover {
        color: #002B55;
    }

.modal-body {
    padding: 20px;
    line-height: 1.6;
    color: #1A1A1A;
}

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

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

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

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

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

/* Responsive styles for modal */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
    }

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

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