/* container */
#container {
    position: relative;
    display: flex;
    width: 100vw;
    height: 100vh;
    padding: 0;
    flex-wrap: wrap;
}

#container .thumbnail {
    position: relative;
    display: block;
    flex-basis: 50%;
    background-image: url('/images/content/login-screen.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

#container .thumbnail:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

#container .thumbnail img {
    position: absolute;
    display: block;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.75;
    z-index: 2;
    max-width: 400px;
}

#container .content {
    position: relative;
    display: table;
    flex-basis: 50%;
    background-color: #FFFFFF;
}

#container .content .details {
    display: table-cell;
    padding: 0 20%;
    vertical-align: middle;
    text-align: left;
}

#container .content h1 {
    display: block;
    margin: 0 0 10px;
    color: #8F8F8F;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

#container .content h2 {
    display: block;
    margin: 0 0 10px;
    color: #1F1F1F;
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
}

#container .content .divider {
    display: block;
    width: 100%;
    margin: 40px 0;
    color: #CACBD0;
    font-size: 16px;
    font-weight: 300;
    text-align: center;
    border-bottom: 1px solid #CACBD0;
    line-height: 0.1em;
}

#container .content .divider span {
    padding: 0 10px;
    color: #CACBD0;
    background: #FFFFFF;
}

#container .content table tr td {
    padding: 10px 0;
}

#container .content table tr td span.title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #3D3D3D;
}

#container .content table tr td input[type="text"],
#container .content table tr td input[type="email"],
#container .content table tr td input[type="password"] {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 15px 0 36px;
    font-size: 14px;
    line-height: 50px;
    border: 0;
    border-radius: 5px;
    background-color: #F8F8F8;
    background-size: 16px 16px;
    background-position: center left 10px;
    background-repeat: no-repeat;
}

#container .content table tr td input[type="text"] {
    background-image: url('/images/icons/login/two-factor.svg') !important;
}

#container .content table tr td input[type="email"] {
    background-image: url('/images/icons/login/email.svg') !important;
}

#container .content table tr td input[type="password"] {
    background-image: url('/images/icons/login/password.svg') !important;
}

#container .content table tr td input[type="submit"] {
    display: block;
    width: 100%;
    height: 60px;
    color: #FFFFFF;
    font-size: 18px;
    text-align: center;
    border: 0;
    border-radius: 5px;
    background-color: #DE332B;
}

/* ========================================
   MOBILE LOGIN (0px - 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Container - full height, no flex wrap */
    #container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    /* Thumbnail - smaller height, full width */
    #container .thumbnail {
        flex-basis: auto;
        height: 120px;
        min-height: 120px;
        background-position: center top;
    }
    
    /* Logo in thumbnail - smaller and centered */
    #container .thumbnail img {
        max-width: 200px;
        max-height: 60px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Content - full width, flex grow */
    #container .content {
        flex-basis: auto;
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #FFFFFF;
        overflow-y: auto;
    }
    
    /* Details - centered, smaller padding */
    #container .content .details {
        display: block;
        width: 100%;
        max-width: 400px;
        padding: 20px;
        text-align: center;
    }
    
    /* Title - smaller font size */
    #container .content h1 {
        font-size: 14px;
        margin: 0 0 8px;
    }
    
    /* Company name - smaller font size */
    #container .content h2 {
        font-size: 32px;
        margin: 0 0 8px;
    }
    
    /* Divider - smaller margins */
    #container .content .divider {
        margin: 30px 0;
        font-size: 14px;
    }
    
    /* Form table - full width */
    #container .content table {
        width: 100%;
    }
    
    /* Form fields - better spacing */
    #container .content table tr td {
        padding: 8px 0;
    }
    
    /* Input labels - smaller font */
    #container .content table tr td span.title {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    /* Input fields - smaller height, better touch targets */
    #container .content table tr td input[type="text"],
    #container .content table tr td input[type="email"],
    #container .content table tr td input[type="password"] {
        height: 48px;
        padding: 0 15px 0 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        line-height: 48px;
        border-radius: 8px;
        background-size: 18px 18px;
        background-position: center left 12px;
    }
    
    /* Submit button - smaller height, better touch target */
    #container .content table tr td input[type="submit"] {
        height: 52px;
        font-size: 16px;
        border-radius: 8px;
        margin-top: 10px;
        font-weight: 600;
    }
    
    /* Focus states for better UX */
    #container .content table tr td input[type="text"]:focus,
    #container .content table tr td input[type="email"]:focus,
    #container .content table tr td input[type="password"]:focus {
        outline: none;
        background-color: #F0F0F0;
        box-shadow: 0 0 0 2px rgba(222, 51, 43, 0.2);
    }
    
    /* Submit button hover/focus */
    #container .content table tr td input[type="submit"]:hover,
    #container .content table tr td input[type="submit"]:focus {
        background-color: #C42A22;
        outline: none;
    }
}

/* ========================================
   SMALL MOBILE LOGIN (0px - 480px)
   ======================================== */
@media (max-width: 480px) {
    /* Thumbnail - even smaller */
    #container .thumbnail {
        height: 100px;
        min-height: 100px;
    }
    
    /* Logo - smaller */
    #container .thumbnail img {
        max-width: 160px;
        max-height: 50px;
    }
    
    /* Details - smaller padding */
    #container .content .details {
        padding: 16px;
    }
    
    /* Title - smaller */
    #container .content h1 {
        font-size: 13px;
    }
    
    /* Company name - smaller */
    #container .content h2 {
        font-size: 28px;
    }
    
    /* Divider - smaller margins */
    #container .content .divider {
        margin: 25px 0;
        font-size: 13px;
    }
    
    /* Input fields - smaller */
    #container .content table tr td input[type="text"],
    #container .content table tr td input[type="email"],
    #container .content table tr td input[type="password"] {
        height: 44px;
        line-height: 44px;
        font-size: 16px;
    }
    
    /* Submit button - smaller */
    #container .content table tr td input[type="submit"] {
        height: 48px;
        font-size: 16px;
    }
}