﻿/* Global reset / base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.LoginBody {
    background: #f0f2f5;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
}

/* --- Main container --- */
.loginContainer {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    max-width: 700px;
    /*width: 100%;*/
    width: 550px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: all 0.2s;
    opacity: 0.9;
}

/* Default: logo on left (flex-direction: row) */
body.logo-left .loginContainer {
    flex-direction: row;
}
/* Logo on top (flex-direction: column) */
body.logo-top .loginContainer {
    flex-direction: column;
}

/* --- Logo column (left) --- */
.loginLogoWrapper {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When logo is on top, hide the left column */
body.logo-top .loginLogoWrapper {
    display: none !important;
}
/* When logo is on left, show the left column */
body.logo-left .loginLogoWrapper {
    display: flex !important;
}

.loginLogoContent {
    text-align: center;
}

    .loginLogoContent .loginImage {
        max-width: 220px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

.loginLogoTd {
    text-align: center;
}

    .loginLogoTd .loginImage {
        max-width: 220px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

/* --- Form column --- */
.loginFormWrapper {
    flex: 1;
    padding: 0.2rem;
    min-width: 280px;
}

/* --- Top logo row (inside the form table) --- */
/* Hide top logo when logo is left */
body.logo-left #trTopLogo {
    display: none !important;
}
/* Show top logo when logo is top */
body.logo-top #trTopLogo {
    display: table-row !important;
}

/* --- Login table styles --- */
.loginTable {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.logintd {
    border: 0 !important;
    padding: 0 !important;
}

.loginTableInner {
    width: 100%;
}

.LoginHeader {
    font-size: 1.5em !important;
    /*font-size: var(--font-size-lg);*/
    font-family: var(--mainfont);
    font-weight: 600;
    color: #1a1a1a;
    /*padding-bottom: 0.75rem;*/
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.loginTableInner td {
    font-size: 0.9rem;
}

.loginTableInner .text {
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 100%;
    max-width: 200px;
    transition: border-color 0.2s;
}

    .loginTableInner .text:focus {
        border-color: #2563eb;
        outline: none;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

.loginButton {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 200px;
    text-align: center;
}

    .loginButton:hover {
        background: #1d4ed8;
        box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    }

.ForgottenPWDLink {
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
}

    .ForgottenPWDLink:hover {
        text-decoration: underline;
    }

.WindowsSignIn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1e293b;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
}

    .WindowsSignIn:hover {
        background: #f1f5f9;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

.WindowsSignInImg {
    height: 5em;
    margin: -30px;
    padding-right: 15px;
    vertical-align: middle;
}

/* --- Left logo cell --- */
#tdLeftLogo {
    width: 180px;
    vertical-align: middle;
    text-align: center;
    padding: 1rem;
}

/* Hide left cell when logo is top */
body.logo-top #tdLeftLogo {
    display: none !important;
}
/* Show left cell when logo is left (default) */
body.logo-left #tdLeftLogo {
    display: table-cell !important;
}

/* --- Responsive: force stack on small screens --- */
@media (max-width: 640px) {
    body.logo-left .loginContainer,
    body.logo-top .loginContainer {
        flex-direction: column !important;
        max-width: 100%;
        border-radius: 16px;
        width: 100%;
    }

    body.logo-left .main-content-row {
        display: block !important;
        width: 100% !important;
    }

    /* Center the logo properly */
    #tdLeftLogo {
        display: block !important;
        width: 99vw !important;
        text-align: center !important;
        border-bottom: 1px solid #e8e8e8;
    }

    .loginLogoWrapper {
        display: inline-block !important; /* Important change */
        width: auto !important;
        max-width: 280px !important; /* Adjust as needed */
        margin: 0 auto !important;
    }

    .loginLogoContent {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

        .loginLogoContent .loginImage {
            max-width: 220px !important;
            height: auto;
        }

    /* Hide top logo row */
    #trTopLogo {
        display: none !important;
    }

    /* Form area */
    #tdLeftLogo + td {
        display: block !important;
        width: 100% !important;
        padding-top: 1rem !important;
    }

    .loginFormWrapper {
        padding: 0.5rem;
    }

    .loginTableInner .text,
    .loginButton {
        max-width: 100% !important;
        width: 100% !important;
    }

    #btnAzureADSSO {
        max-width: 100% !important;
        width: 100% !important;
    }

    #btnOAuthSSO {
        max-width: 100% !important;
        width: 100% !important;
    }
    
}

/* --- Forgotten password overlay --- */
.forgottenDiv {
    width: 100%;
    height: 100vh;
    z-index: 12;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .forgottenDiv table {
        background: #fff;
        border-radius: 24px;
        padding: 0.3rem !important;
        max-width: 480px;
        width: 90%;
        box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    }

.fa-facebook, .fa-linkedin {
    font: normal normal normal 14px / 1 FontAwesome !important;
}