﻿#contactwrapper {
    margin-top: 15%;
    min-height: 600px;
    display: flow-root;
}

#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 {
    text-align: left;
}

#photoarea {
    float: right;
    width: 40%;
    margin-left: -4em;
    margin-top: 2em;
    position: relative;
    top: 0em;
    left: -40px;
    margin-bottom: 0em;
}

#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;
}

/* Feedback's label sits above its box: same gaps as every stacked label (13px from the field
   above - the row's own 8px + 5px - and 5px to its box) */
#form > form > ul > li > label[for=feedback] {
    top: 0;
    margin-top: 5px;
    margin-bottom: 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 {
    display: block;
    float: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 6em;
    max-height: 25em;
    resize: vertical;
}

#photoarea > img {
    vertical-align: text-bottom;
    border-width: 0px;
}

#frame {
    position: relative;
    top: -8px;
    left: -34px;
    z-index: 5;
    transform: rotate(2deg);
    -moz-transform: rotate(2deg);
    -webkit-transform: rotate(2deg);
    -ms-transform: rotate(2deg);
}

#photo {
    position: absolute;
    top: 28px;
    left: 10px;
    z-index: 6;
    transform: rotate(2.25deg);
    -moz-transform: rotate(2.25deg);
    -webkit-transform: rotate(2.25deg);
    -ms-transform: rotate(2.25deg);
}

/* Same 20px gap above the Send Feedback button as the other forms' buttons */
#captcha {
    margin: 0 0 20px 0;
}

#verify {
    margin-top: 16px;
}

@media screen and (max-width: 930px) {
    h1 {
        float: none !important;
        clear: both !important;
    }

    #captcha {
        margin-left: 0% !important;
        margin-top: 0% !important;
        float: none !important;
        clear: both !important;
        margin-bottom: 20px !important;
    }

    #contactwrapper {
        margin-top: 0% !important;
        min-height: 750px !important;
    }

    form {
        float: none !important;
        width: 100% !important;
    }

    #form {
        width: 50% !important;
        float: left !important;
    }

    input, textarea {
        width: 250px !important;
        float: none !important;
        text-align: left !important;
        margin-bottom: 13px !important;
    }

    #feedback {
        box-sizing: content-box;
    }

    /* 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-top: 0 !important;
        margin-bottom: 5px !important;
    }

    .field-validation-error {
        float: none !important;
        text-align: left !important;
        display: block !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: 630px) {
    #photo {
        width: 80%;
        top: 18px !important;
        left: -19px !important;
    }
}

@media screen and (max-width: 530px) {
    #photoarea, #photo, #frame {
        visibility: hidden !important;
        float: none !important;
        width: 0% !important;
        height: 0% !important;
        margin: 0em !important;
    }

    input, textarea {
        width: 100% !important;
    }

    label {
        width: 100% !important;
    }

    #form {
        width: 90% !important;
        float: left !important;
    }

    #contactwrapper {
        min-height: 0 !important;
        padding-bottom: 2em;
    }
}