﻿#loginwrapper {
    margin-top: 15%;
    height: 600px;
}

#form, #photoarea {
    vertical-align: top;
    display: inline-block;
    zoom: 1;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

#form {
    width: 50%;
    float: left;
}

#form > form > h1, #form > form > p {
    text-align: left;
}

#photoarea {
    float: right;
    width: 40%;
    margin-left: -4em;
    margin-top: 2em;
    position: relative;
    bottom: 10%;
}

#form > form > ul {
    margin-top: 2em;
    list-style-type: none;
    padding: 0;
    display: block;
    list-style-position: inside;
    text-align: left;
}

#form > form > ul > li {
    display: block;
}

#form > form > ul > li > label {
    min-width: 16px;
    display: inline-block;
    margin-right: 1ex;
    vertical-align: top;
    zoom: 1;
    margin-bottom: 4%;
    /* Level with the text inside the field beside it (its 1px border + 5.5px top padding) */
    position: relative;
    top: 6.5px;
}

#form > form > ul > li > input, #feedback {
    width: 250px;
    border: 1px solid white;
    border-radius: 1ex;
    -moz-border-radius: 1ex;
    -webkit-border-radius: 1ex;
    padding: 4px 6px;
    background-color: #ece9e1;
    box-shadow: inset 0px 2px 3px rgba(0,0,0,0.2);
    float: right;
}

#feedback {
    width: 54ex;
}

#photoarea > img {
    vertical-align: text-bottom;
    border-width: 0px;
}

#frame {
    position: relative;
    top: 0px;
    left: -40px;
    z-index: 5;
}

#photo {
    position: absolute;
    top: 32px;
    left: 4px;
    z-index: 6;
}

/* On its own line under the button, lined up with it (beside the button it wrapped mid-phrase
   in the field-width button row) */
#forgotpassword {
    display: block;
    width: fit-content;
    margin-top: 10px;
    text-decoration: none;
    color: var(--mt-blue);
}

#forgotpassword:hover {
    text-decoration: underline;
}

/* The button row starts where the fields do: they float to the right edge and are 264px wide
   (250px + 6px padding and 1px border each side). */
#form > form > ul > li:has(> .submitbutton) {
    clear: both;
    padding-left: calc(100% - 264px);
    padding-top: 12px;
}

@media screen and (max-width: 930px) {
    /* Labels sit above the fields here, so the fields - and the button - start at the left edge */
    #form > form > ul > li:has(> .submitbutton) {
        padding-left: 0;
        padding-top: 7px;
    }

    #loginwrapper {
        margin-top: 1em !important;
        height: 500px !important;
    }

    /* Stacked: 5px from label to field, 13px from field to the next label (same on every form) */
    label {
        clear: both !important;
        width: 250px !important;
        text-align: left !important;
        display: block !important;
        top: 0 !important;
        margin-bottom: 5px !important;
    }

    input {
        width: 250px !important;
        float: none !important;
        text-align: left !important;
        margin-bottom: 13px !important;
    }

    #frame {
        width: 100%;
        top: 0px;
        left: -40px;
    }

    #photo {
        width: 80%;
        top: 22px !important;
        left: -10px !important;
    }
}

@media screen and (max-width: 750px) {
    #photo {
        width: 80%;
        top: 18px !important;
        left: -15px !important;
    }
}

@media screen and (max-width: 600px) {
    h1 {
        float: none !important;
        clear: both !important;
    }

    #photoarea, #photo, #frame {
        visibility: hidden !important;
        float: left !important;
        width: 0%;
        margin: 0em !important;
    }

    form {
        float: none !important;
        width: 100% !important;
    }

    #form, form > ul > li > a {
        width: 100% !important;
        float: none !important;
    }

    #headerimage > h1 > a {
        float: none !important;
    }

    #headernav > ul :first-child {
        margin-left: 0px !important;
    }

    .field-validation-error {
        float: none !important;
        text-align: left !important;
        display: block !important;
    }

    #loginwrapper {
        height: 350px !important;
    }

    input {
        width: 90% !important;
    }
}
