#orienationNotice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(229, 228, 224);
    background-image: url('landscapeToPortrait.svg');
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 40vh;
    background-size: calc(var(--vh) * 0.4);
    background-size: 100px;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.125em;
    z-index: 1000;
    text-align: center;
    display: none;
}
    @media screen and (max-height: 480px) and (orientation:landscape) {
        #orienationNotice { display: block; }
    }

html { min-height: 100%; }

/* html, body { height: 100%; } */

body { 
    margin: 0; 
    background-image: url('fullBackground.jpg');
    background-position: center 75px;
    background-repeat: no-repeat;
    font-family: 'Open Sans', sans-serif;
    background-color: #231f20;
    min-height: 100vh;
    min-height: calc(var(--vh));
}

h1 {
    font-weight: 700;
    font-size: 30px;
    transition: font-size 0.25s, margin 0.25s;
}

h2 {
    font-weight: 600;
    font-size: 24px;
    transition: font-size 0.25s, margin 0.25s;
}

h3 {
    font-weight: 600;
    /* font-size: 18px; */
    font-size: 16px;
    letter-spacing: -0.5px;
}

h4 {
    font-weight: 600;
    font-size: 14px;
}

#outerWrapper {
    max-height: 1275px;
    width: 100%;
    overflow: hidden;    
    position: absolute;
    height: 100%;
}

    body.debug #outerWrapper { outline: 1px solid red; }

.titleBar {
    background-color: #231f20;
    height: 75px;
    color: #dadbd8;
    text-align: center;
    transition: height 0.25s;
}

    .titleBar img { 
        height: 60px; 
        margin: 7px 0 0;
        transition: height 0.25s, margin 0.25s;
    }

#configBar { display: none; }

#configure { 
    position: absolute;
    z-index: 2;
    margin: 0.125em 12px;
    text-shadow: 0 0 8px #eeedeadd;
}

#mainWrapper {
    position: relative;
    margin: -75px auto 0;
    /* max-height: 1275px; */
    max-width: 1200px;
    height: 100%;
    box-sizing: border-box;
    padding-top: 75px;
    padding-bottom: 100px;

    transform: translateZ(0); /* to make fixed positioning of the close button relative to this element */
}

#controls {
	position: absolute;
	left: 0;
	top: 75px;
	bottom: 0;
	width: 346px;
	background-color: rgba(238, 237, 234,0.75);
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 0 3px rgba(73,73,73,0.3);
    color: #292b2d;
    z-index: 29;
}

    #controls  h3 {
        margin: 8px 0 8px 12px;
    }

    #controls h4 { 
        color: #36393b; 
        text-align: center;
        margin: 5px;
    }
    
    #controls .close { display: none; }

#title {
    position: absolute;
    top: 75px;
    left: 346px;
    padding-left: 36px;
    color: #231f20;
    z-index: 20;
    text-shadow: 0 0 8px #eeedeadd;
}

    #title h1 { margin: 0.5em 0 -0.25em; }
    #title h2 { 
        font-size: 18px;
        font-weight: 700;
        margin: 0em 0 0; 
    }

#currentSelection {
    z-index: 2;
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    top: 205px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.imageContainer#mainImage {
    position: relative;
    /*
    background-image: url('../data/background.jpg');
    background-size: cover;
    */
    /*
    height: 756px;
    background-position-x: 70px;
    */
    height: 890px;
    pointer-events: none;

    /* overflow: hidden; */
    max-height: 100%;
    max-width: 1100px;
    max-width: 1200px;


    /*
    padding-top: 80.91%;
    height: 0;
    */
    height: 890px;
    background-size: cover;
    /* min-width: 1100px; /* temp */

}

    body.debug .imageContainer#mainImage {
        outline: 1px solid blue;
    }


.imageContainer#preview {
    position: relative;
    width: 100%;
    height: 205px;
    background-image: url('previewBG.png');
    background-size: cover;
    z-index: 1;
    overflow: hidden;
}

.imageContainer .layer {
    position: absolute;
    top: 0;
    height: 100%;

    /* background-position-x: 70px; */

    /*
    background-repeat: no-repeat;
    background-position-x: right -10%;
    */

    /*
    left:-37.0909%;
    width:137.0909%;
    background-position-x:408px;
    background-color:rgba(255,0,0,0.025);
    */
    background-repeat: no-repeat;
        background-size: contain;
}
    
    .imageContainer#preview .layer {
        left: 0;
        width: 100%;
        /*
        width: 150%;
        background-position: -20px -5px;
        */
        /*background-position: 0 5px;*/
        background-position: 80px 5px;
    }
    
    .imageContainer#mainImage .layer {
        left: 346px;
        width: calc(100% - 346px);

        background-position: center;
    }


.imageContainer .layer.shadow {
    height: 190.45%; /* shadow layers are 1.9045 times taller than the foreground layers (1695px vs. 890px) */
    /* padding-bottom: 73.181818%; */
    left: 0;
    /* padding-right: 81.8182%; */
}
    
    .imageContainer#preview .layer.shadow {
        padding-left: 159px;
        padding-right: 413px;
        left: -80px;
        left: -68px;
    }
    
    .imageContainer#mainImage .layer.shadow {
        padding-left: 346px;

        /* These are to position the shadow layer to match the foreground layers, as they are different                */
        /* sizes and the preview is scaled to fit the foreground layers.                                               */
        /* Because everything is a background image with background-size:cover, we have to accommodate by:             */
        /*  - proportionally changing the size of the shadow container, which is done with "padding-right"             */
        /*  - proportionally shifting the shadow layer over, with "left"                                               */
        /* 100% = width of parent (#mainImage) which has a max-width of 1100px (754+346)                               */
        /* 754px = max width of visible part of preview area                                                           */
        /* 346px = width of sidebar                                                                                    */
        /* 1246px = width of shadow bitmaps (2000px) minus max width of visible part of preview area                   */
        /*   (100% - 346px) = actual width of visible part of preview area                                             */
        /*   ((100% - 346px) / 754)) = actual width of visible part of preview area as a multiple of its maximum width */
        padding-right: calc(( (100% - 346px) / 754 * 1246) - 346px); 
        left: calc( 346px - (346 * ((100% - 346px) / 754)));
        padding-right: calc(( (100% - 346px) / 854 * 1146) - 346px); 
        left: calc( 346px - (346 * ((100% - 346px) / 854)));
        left: calc( 346px - (346 * ((100% - 346px) / 854)) + 50px);
        left: calc( 346px - (296 * ((100% - 346px) / 854)));
    }

    
   /*
   @media screen and (max-height: 1065px) and (min-aspect-ratio: 1100/1065) {
        /* 1065px = max height of visible part of preview area (965px + 100px for share buttons) */
        /* 990px = the above, less the titlebar, as that's not really part of the preview area */
        /* (1065px - 100vh) = number of pixels less than 1065 that are available in the viewport */
        /*
        body { background-position-y: calc(((1065px - 100vh)*-0.84) + 75px); }
        .imageContainer#mainImage .layer.shadow { margin-left: calc((1065px - 100vh)*0.3875); } 
        .imageContainer#mainImage .layer.shadow { margin-left: calc((1065px - 100vh)*-0.31); } /* for horizontal centering */
        /*
    }
    */

    
    @media screen and (max-height: 1065px) and (min-width: 855px) {
        /* 1065px = max height of visible part of preview area (965px + 100px for share buttons) */
        /* 990px = the above, less the titlebar, as that's not really part of the preview area */
        /* (1065px - 100vh) = number of pixels less than 1065 that are available in the viewport */

        /*
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.84) + 75px); }
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc((1065px - 100vh)*0.3875); } 
        */
        /*
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.69) + 75px); }
        body.aspectCorrect { background-position-y: calc(((1065px - var(--vh))*-0.69) + 75px); }
        */
        body { background-position-y: calc(((1065px - 100vh)*-0.69) + 75px); } /* IE fallback */
        body { background-position-y: calc(((1065px - var(--vh))*-0.69) + 75px); }
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc((1065px - 100vh)*-0.31); } /* IE fallback */
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc((1065px - var(--vh))*-0.31); } /* for horizontal centering */
    }

    /*
    @media screen and (max-width: 1100px) {
        body { background-position-y: calc(((1100px - 100vw)*-0.8125) + 75px); }
        body { background-position-y: calc(((1100px - 100vw)*-0.24) + 75px); }
        .imageContainer#mainImage .layer.shadow { top: calc(-27/50 * (1100px - 100vw)); } /* for vertical centering *
    }

    @media screen and (max-width: 1100px) and (max-height: 1065px) {
        body { background-position-y: calc(50% + 75px); }
        .imageContainer#mainImage .layer.shadow { top: calc((-27/50 * (1100px - 100vw)) + ((1065px - 100vh)*23/50)); } /* for vertical centering *
        .imageContainer#mainImage .layer.shadow { top: calc((-27/50 * (1100px - 100vw)) + ((1065px - var(--vh))*23/50)); } /* for vertical centering *
    }
    */

    @media screen and (max-width: 1200px) {
        /*
        body { background-position-y: calc(((1200px - 100vw)*-0.8125) + 75px); }
        body { background-position-y: calc(((1200px - 100vw)*-0.24) + 75px); }
        */
        body { background-position-y: calc(((1200px - 100vw)*-0.2) + 75px); }
        /* body.aspectCorrect { background-position-y: calc(((1200px - 100vw)*-0.2) + 75px - 0.5*(1065px - var(--vh))); } 
        .imageContainer#mainImage .layer.shadow { top: calc(-27/50 * (1200px - 100vw)); } /* for vertical centering */
        .imageContainer#mainImage .layer.shadow { top: calc(-23.75/50 * (1200px - 100vw)); } /* for vertical centering */
    }

    @media screen and (max-width: 1200px) and (max-height: 1065px) {
        /*
        body { background-position-y: calc(50% + 75px); }
        body { background-position-y: calc(((1065px - var(--vh))*-0.69) + 75px); }
        */
        body { background-position-y: calc(((1200px - 100vw)*-0.2) + 75px - 0.5*(1065px - 100vh)); } /* IE fallback */
        body { background-position-y: calc(((1200px - 100vw)*-0.2) + 75px - 0.5*(1065px - var(--vh))); }
        /*
        .imageContainer#mainImage .layer.shadow { top: calc((-27/50 * (1200px - 100vw)) + ((1065px - 100vh)*23/50)); } /* for vertical centering *
        .imageContainer#mainImage .layer.shadow { top: calc((-27/50 * (1200px - 100vw)) + ((1065px - var(--vh))*23/50)); } /* for vertical centering */
        .imageContainer#mainImage .layer.shadow { top: calc((-23.75/50 * (1200px - 100vw)) + ((1065px - 100vh)*23/50)); } /* IE fallback */
        .imageContainer#mainImage .layer.shadow { top: calc((-23.75/50 * (1200px - 100vw)) + ((1065px - var(--vh))*23/50)); } /* for vertical centering */
    }

    /* when smaller than 1100x1065 and the vertical scaling is more of a factor than the horizontal */
    /*
    @media screen and (max-width: 1100px) and (max-height: 1065px) and (min-aspect-ratio: 1100/1065) {
        body { background-position-y: calc(((1065px - 100vh)*-0.84) + ((1100px - 100vw) *9/50) + 75px); }
        .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*0.3875) - ((1100px - 100vw) *23/50)); } 
        .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*-0.31) - ((1100px - 100vw) *-0.37)); } 

        /* for vertical centering */
        /*
        .imageContainer#mainImage .layer.shadow { top: 0; }
    }
    */

    /* when smaller than 1100x1065 and the vertical scaling is more of a factor than the horizontal *
    @media screen and (max-width: 1100px) and (max-height: 1065px) {
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.84) + ((1100px - 100vw) *9/50) + 75px); }
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.69) + ((1100px - 100vw) *9/50) + 75px); }
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.69) + 75px); }
        body.aspectCorrect { background-position-y: calc(((1065px - var(--vh))*-0.69) + 75px); }
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*0.3875) - ((1100px - 100vw) *23/50)); } 
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*-0.31) - ((1100px - 100vw) *-0.37)); } 
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - var(--vh))*-0.31) - ((1100px - 100vw) *-0.37)); } 

        /* for vertical centering *
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { top: 0; }
    }
    */

    /* when smaller than 1100x1065 and the vertical scaling is more of a factor than the horizontal */
    @media screen and (max-width: 1200px) and (max-height: 1065px) {
        /*
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.84) + ((1200px - 100vw) *9/50) + 75px); }
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.69) + ((1200px - 100vw) *9/50) + 75px); }
        */

        /* for vertical centering */
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { top: 0; }
    }
    @media screen and (max-width: 1200px) and (max-height: 1065px) and (min-width: 855px){
        body.aspectCorrect { background-position-y: calc(((1065px - 100vh)*-0.69) + 75px); } /* IE fallback */
        body.aspectCorrect { background-position-y: calc(((1065px - var(--vh))*-0.69) + 75px); }
        /*
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*0.3875) - ((1200px - 100vw) *23/50)); } 
        */
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - 100vh)*-0.31) - ((1200px - 100vw) *-0.32)); } /* IE fallback */
        body.aspectCorrect .imageContainer#mainImage .layer.shadow { margin-left: calc(((1065px - var(--vh))*-0.31) - ((1200px - 100vw) *-0.32)); } 
    }


.imageContainer .layer.handleShadow.bottom           { z-index: 1; }
.imageContainer .layer.handleShadow.top              { z-index: 2; } 
.imageContainer .layer.spoutShadow.bottom            { z-index: 3; } 
.imageContainer .layer.spoutShadow.top               { z-index: 4; } 
.imageContainer .layer.handle.right.bottom           { z-index: 5; } 
.imageContainer .layer.handle.right.bottom.topFinish { z-index: 6; } 
.imageContainer .layer.handle.right.top              { z-index: 7; }
.imageContainer .layer.handle.right.top.topFinish    { z-index: 10; }  
.imageContainer .layer.cover.right.bottom            { z-index: 8; } 
.imageContainer .layer.cover.right.top               { z-index: 9; }
.imageContainer .layer.spout.bottom                  { z-index: 11; } 
.imageContainer .layer.spout.bottom.topFinish        { z-index: 12; }
.imageContainer .layer.spout.top                     { z-index: 13; }
.imageContainer .layer.spout.top.topFinish           { z-index: 14; }

.imageContainer .layer.handle.left.bottom            { z-index: 15; } 
.imageContainer .layer.handle.left.bottom.topFinish  { z-index: 16; } 
.imageContainer .layer.handle.left.top               { z-index: 17; }
.imageContainer .layer.handle.left.top.topFinish     { z-index: 20; }  
.imageContainer .layer.cover.left.bottom             { z-index: 18; } 
.imageContainer .layer.cover.left.top                { z-index: 19; }
 

.imageContainer .layer.bottom { opacity: 0; }
.imageContainer .layer.top { opacity: 1; }


.transition {
    -webkit-transition: opacity 0.25s ease-in-out;
    -moz-transition: opacity 0.25s ease-in-out;
    -o-transition: opacity 0.25s ease-in-out;
    -ms-transition: opacity 0.25s ease-in-out;    
    transition: opacity 0.25s ease-in-out;
}

.partThumbnail {
    position: relative;
    width: 150px;
    height: 150px;
    display: inline-block;
    border: 1px solid rgba(241,240,239,0.4);
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
    background: linear-gradient(to bottom, rgba(221,220,218,0.5) 0%,rgba(239,240,241,0.5) 100%);
}

    .partThumbnail.unavailable {
        display: none;
    }

    .partThumbnail::after {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        box-shadow: inset 0 0 55px 20px rgba(255,255,255,0.5);
        border-radius: 5px;
        opacity: 0;
        transition: opacity 0.25s;
    }

        .partThumbnail:hover,
        .partThumbnail.selected { border: 1px solid #c2c2c1; }
        .partThumbnail:hover::after,
        .partThumbnail.selected::after { opacity: 1; }

        .selectList .partThumbnail {
            background: none;
            border-color: transparent;
            box-shadow: none;
            /* margin: 10px 10px 30px 22px; */
            margin: 10px 10px 44px 22px;
            transition: box-shadow 0.25s, border-color 0.25s, background 0.25s, margin 0.25s;
            vertical-align: top;
        }

            .selectList .partThumbnail.selected { 
                border-color: rgb(194, 194, 193); 
                box-shadow: 0 0 4px rgba(0,0,0,0.1);
            }

            .selectList .partThumbnail:hover { 
                box-shadow: 0 0 4px rgba(0,0,0,0.1);
                background: linear-gradient(to bottom, rgba(221,220,218,0.5) 0%,rgba(239,240,241,0.5) 100%); 
            }

            .selectList .partThumbnail:hover { border: 1px solid #c2c2c1; }
            .selectList .partThumbnail:hover::after { opacity: 0; }
            .selectList .partThumbnail.selected::after { opacity: 1; }

    .partThumbnail .thumbnail {
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
        border-radius: 5px;
        display: block;
        margin-bottom: 5px;
    }

    .partThumbnail .thumbnail img {
        width: 100%;
        height: 100%;
        position: absolute;
        top:0;
        left: 0;
        z-index: 1;
    }

    .partThumbnail .thumbnail img.topFinish {
        z-index: 2;
    }

    .partThumbnail .title {
        font-size: 12px;
        line-height: 1.125em;
        white-space: normal;
    }

        .partThumbnail .title .modelNum { display: block; }

#currentSelection .part {
    display: inline-block;
}

#currentSelection .part.hidden {
    display: none;
}

#currentSelection .selection {
    position: relative;
    width: 152px;
    /* height: 170px; */
    height: 191px;
    margin: 0 0 0 12px;
}

    #currentSelection .cover .selection { display: inline-block; }

#currentSelection .selection .partThumbnail {
    position: absolute;
    top: 0;
    left: 0;
}

#currentSelection .partThumbnail.new {
    opacity: 0;
}

#currentSelection .section {
    background-image: url('sectionLine.png');
    background-position: left top;
    background-repeat: repeat-x;
    padding-bottom: 12px;
    margin-top: 12px;
    border-top: 1px solid transparent;
    width: 100%;
}
#partSelector {  
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
    opacity: 1;

    position: absolute;
    left: 346px;
    right: 0;
    top: 75px;
    bottom: 0;
    background-color: #ddd;
    z-index: 28;
    overflow-y: auto;
    box-shadow: 0 0 16px rgba(0,0,0,0.3);

    /* padding-top: 45px; */
    padding-top: 65px;
}

    #partSelector.hidden {
        opacity: 0;
        pointer-events: none;
        right: 0%;
        transform: translateX(-60%);
    }

        #partSelector.hidden .close {
            /*
            position: absolute;
            top: 0;
            right: 0;
            transition: all 0s 0s;
            */
        }

        #partSelector.hidden .legend {
            /*
            position: absolute;
            top: 7px;
            right: 58px;
            transition: all 0s 0s;
            */
        }

        #partSelector.hidden h2 {
            /*
            position: absolute;
            top: 0;
            left: 0;
            transition: all 0s 0s;
            */
        }
        #partSelector.hidden .close,
        #partSelector.hidden .legend,
        #partSelector.hidden h2 {
            transition: all 0s 0s;
            opacity: 0;
        }

    #partSelector .selectList {
        display: none;
        padding-bottom: 1em;
        text-align: center;
    }

    #partSelector .selectList .partThumbnail.preferred::before,
    #partSelector .selectList .partThumbnail.splitFinish::before {
        content: '';
        width: 16px;
        height: 16px;
        display: block;
        background-image: url('star.png');
        background-repeat: no-repeat;
        position: absolute;
        top: 5px;
        right: 5px;
    }

        #partSelector .selectList .partThumbnail.preferred::before {
            background-image: url('star.png');
        }

        #partSelector .selectList .partThumbnail.splitFinish::before {
            background-image: url('split.png');
        }


    #partSelector .close {
        z-index: 4;
        margin: 8px 12px;

        position: fixed;
        top: 75px;
        right: 17px;
    }

    #partSelector .legend {
        z-index: 4;
        margin: 8px 12px;

        position: fixed;
        /* right: 75px; */
        /* top: 82px; */
        left: 356px;
        top: 110px;
    }

        #partSelector .legend > span {
            color: transparent;
            width: 16px;
            height: 16px;
            display: inline-block;
            background-image: url('star.png');
            background-repeat: no-repeat;
            line-height: 1em;
        }

            #partSelector .legend.splitFinish > span { background-image: url('split.png'); }

    #partSelector h2 {
        position: fixed;
        background-color: rgb(221, 221, 221);
        top: 75px;
        left: 346px;
        right: 20px;
        box-sizing: border-box;
        font-size: 22px;
        font-weight: 600;
        margin: 0;
        padding: 8px 22px 13px;
        z-index: 3;
        text-align: left;

        padding: 8px 22px 17px;
        background: linear-gradient(to bottom, rgb(221, 221, 221) 70%,rgba(221,221,221,0) 100%);

        height: 75px;
    }

    #partSelector .close,
    #partSelector .legend,
    #partSelector h2 {
        transition: all 0.5s 0.375s;
        opacity: 1;
    }

    /* hack for Internet Explorer 10/11, where fixed positioning is not relative to a parent with a CSS transform, as it should be */
    @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
        #partSelector .close {
            position: absolute;
            top: 0;
            right: 0;
        }

        #partSelector .legend {
            position: absolute;
            top: 7px;
            right: 58px;
        }

        #partSelector h2 {
            position: absolute;
            top: 0;
            left: 0;
        }    
    }    

    #partSelector h3 {
        padding: 8px 22px;
        margin: 4em 0 0;
        text-align: center;
        background-color: rgba(35, 31, 32, 0.1);
    }

#share {
    padding-left: 346px;
    text-align: center;
    margin-top: -40px;
}

#smallPrint {
    position: absolute;
    bottom: 2px;
    right: 5px;
    font-size: 8px;
    font-style: italic;
}

#contactDialog.friend .dealerField {
    display: none;
}

#contactDialog.dealer .friendField {
    display: none;
}

.ui-dialog {
    padding: 0;
    background-color: rgb(230,229,225);
    background-color: rgb(214,213,210);
    border: none !important;
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
    max-width: 90%;
}

    .ui-dialog .ui-dialog-titlebar {
        background-color: rgb(35, 31, 32);
        color: rgb(218, 219, 216);
        border-radius: 0;
        border: none !important;
    }

        .ui-widget-header { font-weight: 600; }

        .ui-dialog .ui-dialog-titlebar-close { 
            right: 1em; 
        }

            .ui-dialog .ui-dialog-titlebar-close .ui-icon { 
                border: none;
                background-color: rgb(218, 219, 216);
                color: #292b2d;
            }

    .ui-dialog .ui-dialog-content { padding-top: 0; }

    .ui-dialog .ui-dialog-buttonpane {
        background: none;
        text-align: center;
        padding: 0;
        margin-top: 0;
    }

        .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 
            float: none; 
            margin-top: 0.5em;
        }

    .ui-dialog div.field {
        margin: 1em 0;
        text-align: right;
    }

        .ui-dialog div.field.dealerField { text-align: center; }

            .ui-dialog div.field.dealerField label { margin: 0; }

        .ui-dialog div.field:last-child { margin-bottom: 0; }

        .ui-dialog div.field:not(.dealerField) label {
            margin-right: 0.5em;
            vertical-align: middle;
            max-width: calc(100% - 190px - 0.75em);
            display: inline-block;
            line-height: 1.125em;
        }

        .ui-dialog div.field input[type=text],
        .ui-dialog div.field input[type=email],
        .ui-dialog div.field textarea {
            width: 190px;
            vertical-align: middle;
            padding: 1px;
            border: 1px solid rgb(152, 151, 150);
        }
        .ui-dialog div.field select { 
            max-width: 100%; 
            border: 1px solid rgb(152, 151, 150);
        }

.ui-widget, .ui-widget .ui-button, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
    font-family: 'Open Sans', sans-serif;
}

.button,
.ui-button {
    display: inline-block;
    padding: 0.25em 1em !important;
    margin: 0 1.5em 1em !important;
    color: #e3e3df !important;
    border-radius: 0.375em;
    text-decoration: none !important;
    background: linear-gradient(to bottom, rgb(0,0,0) 0%,rgb(40,40,40) 100%) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer;
    transition: color 0.25s, box-shadow 0.25s, margin 0.25s, top 0.25s;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
    border: none;
    position: relative;
    top: 0 !important;
    right: auto !important;
}

    .button:hover,
    .ui-button:hover { 
        color: white !important; 
        border: none;
    }

    .button:active,
    .ui-button:active { 
        box-shadow: 0 0 3px rgba(0,0,0,0.4);
        margin-bottom: 14px !important;
        top: 2px;
    }

.socialMedia { padding: 1em 0 2em; }

    .shareButton {
        position: relative;
        display: inline-block;
        margin: 0 1.5em;
        width: 58px;
        height: 58px;
        overflow: hidden;
        text-decoration: none;
        background-position: center;
        background-repeat: no-repeat;
        cursor: pointer;
        line-height: 1em;
        font-size: 12px;
        color: transparent;
    }

        .shareButton::before,
        .shareButton::after {
            content: '';
            display: block;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
        }

        .shareButton.twitter-share::before { background-image: url('social-twitter.png'); }
        .shareButton.facebook-share::before { background-image: url('social-facebook.png'); }
        .shareButton.pinterest-share::before { background-image: url('social-pinterest.png'); }

        .shareButton::before { z-index: 2; }
        .shareButton::after { 
            z-index: 1;
            background: radial-gradient(ellipse at center, rgba(255,255,255,1) 50%,rgba(255,255,255,0) 70%); 
            opacity: 0; 
            transition: opacity 0.25s;
            border-radius: 50%;
        }
        .shareButton:hover::after { opacity: 1; }

@media screen and (max-height: 1100px) {
    #share {
        margin-top: 0;
        position: absolute;
        box-sizing: border-box;
        width: 100%;
        bottom: 0;
        z-index: 25;
    }
    .socialMedia { padding: 0.5em 0 1em; }
}

.close {
    display: inline-block;
    padding: 0;
    color: #e3e3df;
    border-radius: 0.375em;
    text-decoration: none;
    background: linear-gradient(to bottom, rgb(0,0,0) 0%,rgb(40,40,40) 100%);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.25s;
    width: 21px;
    height: 21px;
    border: 7px solid transparent;
}

    .ui-dialog .ui-dialog-titlebar-close {
        display: inline-block;
        padding: 0 !important;
        color: #e3e3df !important;
        border-radius: 0.375em;
        text-decoration: none;
        background: linear-gradient(to bottom, rgb(0,0,0) 0%,rgb(40,40,40) 100%) !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        cursor: pointer;
        width: 21px !important;
        height: 21px !important;
        border: 7px solid transparent;
        margin: 0 !important;
        box-sizing: content-box;
        right: 10px !important;
    }

        .ui-dialog .ui-dialog-titlebar-close .ui-icon { display: none; }

    .close::after,
    .ui-dialog .ui-dialog-titlebar-close::after {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;

        content: '\f00d';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 28px;
        line-height: 21px;
        text-indent: 0;
    }
    
        .close.back::after {
            content: '\f060';
            font-size: 24px;
        }

        .close.up::after {
            background-image: none !important;
            content: '\f062';
            font-size: 24px;
        }

    .close:hover,
    .ui-dialog .ui-dialog-titlebar-close:hover{ 
        color: white !important; 
        transition: color 0.25s;
    }
    
    .close.back::before,
    .close.up::before {
        color: black;
        content: 'Back to my faucet';
        display: block;
        white-space: nowrap;
        position: absolute;
        right: calc(100% + 1em);
        top: 0;
    }



@media screen and (max-width: 854px) {
    body {
        /* 355px = a place where it lines up now that the preview is no longer offset by the sidebar */
        /* background-position-y: calc(((1200px - 100vw)*-0.8125) + 365px); */

        background-position-y: calc(((854px - 100vw)*-0.2) + 142px - ((1132px - 100vh)*0.5) + 21px); /* IE fallback */
        background-position-y: calc(((854px - 100vw)*-0.2) + 142px - ((1132px - var(--vh))*0.5) + 21px);
        background-position-x: calc(50% - 173px); /* to compensate for the sidebar removal */
    }

    #mainWrapper { 
        padding-top: 143px; 
        margin-top: -143px;
    }
    .imageContainer#mainImage { 
        /* 140px = space for buttons; 142px = titlebar + configBar */ 
        margin: auto;
        height: calc(100vh - 100px - 142px); /* IE fallback */
        height: calc(var(--vh) - 100px - 142px);
        max-width: calc((100vh - 100px - 142px)*854/890); /* IE fallback */
        max-width: calc((var(--vh) - 100px - 142px)*854/890);
        max-height: calc((100vw)*890/854);
    }
    #controls {
        width: 100%;
        text-align: center;
        transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 0 16px rgba(0,0,0,0.3);
        transform: translateY(-100%);
        background-color: #eeedea;
    }
        #controls.open {
            opacity: 1;            
            transform: translateY(0);
            pointer-events: auto;
        }    
        #controls .close {
            z-index: 4;
            margin: 8px 12px;
            position: fixed;
            top: 5px;
            right: 5px;
            display: inline-block;
        }
            #controls .close.up {
                top: 0;
                right: 0;
            }
        #controls h2 { text-align: left; }
    #configure { 
        left: 0;
        right: 0;
    }
    #title {
        left: 0;
        top: 143px;
        padding: 0 1em;
    }
    #title h1 { margin-top: 0.25em; }
    .imageContainer#preview {
        box-shadow: 0 0 25px inset rgba(0,0,0,0.25);
    }
    .imageContainer#preview .layer {
        background-position-x: center;
    }
    .imageContainer#preview .layer.shadow { left: -223px; }
    .imageContainer#mainImage .layer {
        left: 0;
        width: 100%;
    }        
    .imageContainer#mainImage .layer.shadow {
        /*
        padding-left: 0;
        padding-right: calc(( (100%) / 754 * 1246)); 
        left: calc(0px - (346 * ((100%) / 754)));
        */


        /* These are to position the shadow layer to match the foreground layers, as they are different                */
        /* sizes and the preview is scaled to fit the foreground layers.                                               */
        /* Because everything is a background image with background-size:cover, we have to accommodate by:             */
        /*  - proportionally changing the size of the shadow container, which is done with "padding-right"             */
        /*  - proportionally shifting the shadow layer over, with "left"                                               */
        /* 100% = width of parent (#mainImage) which has a max-width of 1100px (754+346)                               */
        /* 754px = max width of visible part of preview area                                                           */
        /* 346px = width of sidebar                                                                                    */
        /* 1246px = width of shadow bitmaps (2000px) minus max width of visible part of preview area                   */
        /*   (100% - 346px) = actual width of visible part of preview area                                             */
        /*   ((100% - 346px) / 754)) = actual width of visible part of preview area as a multiple of its maximum width */
        padding-right: calc(100%/854*900);
        padding-left: calc(100%/854*346);
        left: calc((-100%/854*346));
        top: 0;

    }
    #currentSelection .part:nth-of-type(odd) .selection { margin-left: 0; }
    #partSelector {
    	z-index: 30;
    	left: 0;
    }
    #partSelector h2 { 
        left: 0; 
        padding-left: 12px;
        padding-right: 12px;
    }
    #partSelector .close.back {
        right: 0;
    }
    #partSelector .legend {
		/*
        margin-left: 240px;
		text-align: right;
		line-height: 1em;
        */
        left: 2px;
    }
    /* .selectList .partThumbnail { margin: 10px 16px 30px 16px; } */
    .selectList .partThumbnail { margin: 10px 16px 44px 16px; }
    #configBar { 
        display: block;
        background-color: #e5e4e0;
        text-align: center;
        height: 67px;
        border-bottom: 1px solid rgba(100,100,100,0.25);
        z-index: 2;
        position: relative;
        opacity: 1;
        transition: opacity 0.25s, height 0.25s;
    }
        #configBar.hidden {
            opacity: 0;
            pointer-events: none;
        }
        #configBar .configButton {
            display: inline-block;
            font-weight: 600;
            font-size: 24px;
            padding: 0.25em 1em;
            margin: 10px;
            border-radius: 0.25em;
            background: linear-gradient(to bottom, #dddcda7f 0%,#eff0f17f 100%) !important;
            cursor: pointer;
            transition: color 0.25s, box-shadow 0.25s, margin 0.25s;
            box-shadow: 0 0 25px inset rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.1);
            border: 1px solid #c2c2c1;
            height: 33px;
            color: #231f20;
            transition: font-size 0.25s, height 0.25s, margin 0.25s;
        }
        #configBar .configButton:hover { color: #000; }
        #configBar .configButton:active {
            box-shadow: 0 0 25px inset rgba(255,255,255,0.5), 0 0 2px rgba(0,0,0,0.1);
            margin: 12px 10px 8px;
        }
    /*
    .button,
    .ui-button {
        font-size: 20px !important;
    }
    */
    #share {
        padding-left: 0;
        position: absolute;
        bottom: 0;
        z-index: 28;
        width: 100%
    }
    #share .button { margin: 0 0.5em 1em !important; }
    .socialMedia { padding: 0 0 1em; }
    /*
    #currentSelection .selection {
        width: 202px;
        height: 220px;
    }
    .partThumbnail {
        width: 200px;
        height: 200px;
    }
    */

    #mainWrapper {
        padding-bottom: 60px;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
    .imageContainer#mainImage { width: 100%; }
}  

/* when smaller than 1100x965 and the vertical scaling is more of a factor than the horizontal */
@media screen and (max-width: 854px) and (max-height: 1132px) {
    /*
    body { background-position-y: calc(((1132px - 100vh)*-0.69) + ((854px - 100vw) *9/50) + 75px); }
    body { background-position-y: calc(((1132px - var(--vh))*-0.69) + ((854px - 100vw) *9/50) + 75px); }
    */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 142px - ((1132px - 100vh)*0.5) + 21px); } /* IE fallback */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 142px - ((1132px - var(--vh))*0.5) + 21px); }
    body.aspectCorrect { background-position-y: calc(((1132px - 100vh)*-0.69) + 142px + 21px); } /* IE fallback */
    body.aspectCorrect { background-position-y: calc(((1132px - var(--vh))*-0.69) + 142px + 21px); }
}  

@media screen and (max-width: 640px) {
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 119px - ((1132px - 100vh)*0.5) + 21px); } /* IE fallback */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 119px - ((1132px - var(--vh))*0.5) + 21px); }
    body.aspectCorrect { background-position-y: calc(((1132px - 100vh)*-0.69) + 142px + 13px); } /* IE fallback */
    body.aspectCorrect { background-position-y: calc(((1132px - var(--vh))*-0.69) + 142px + 13px); }
    .titleBar { height: 50px; }
    .titleBar img { height: 40px; margin: 5px 0; }
    #configBar { height: 44px; }
    #configBar .configButton {
        font-size: 16px;
        height: 22px;
        margin: 6px;
    }

    #mainWrapper {
        padding-top: 95px;
        margin-top: -95px;
        padding-bottom: 60px;
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
    #title { top: 95px; }
    #controls,
    #partSelector,
    #partSelector h2,
    #partSelector .close { top: 50px; }
    #partSelector .close { margin: 8px 6px; right: 7px; }
    #partSelector .legend { 
        /*
        top: 52px; 
        right: 50px;
        margin-left: 190px;
        margin-right: 6px;
        */
        font-size: 14px;
        top: 75px;
    }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    #configure { margin: 6px 12px; }
    #title h2 { font-size: 14px; }
    #partSelector h2 { font-size: 18px; padding: 6px 12px; }
    h3 { font-size: 14px; }
    .close {
        width: 16px;
        height: 16px;
    }
    .close.back::before,
    .close.up::before {
        font-size: 14px;
        letter-spacing: -0.5px;
        line-height: 16px;
    }
    .close.back::after,
    .close.up::after {
        font-size: 18px;
        line-height: 16px;
    }
    .ui-dialog .ui-dialog-titlebar-close {
        width: 16px !important;
        height: 16px !important;
        margin-top: 3px !important;
    }
    .close::before, 
    .close::after, 
    .ui-dialog .ui-dialog-titlebar-close::before, 
    .ui-dialog .ui-dialog-titlebar-close::after {
        background-size: 32px 16px;
    }
    .ui-dialog div.field { margin: 0.75em 0; }
    #controls .close { margin: 4px 6px; }
    .socialMedia { padding-bottom: 0.75em; }
    #share .button { margin: 0 0.25em 0.75em !important; }
    .shareButton {
        width: 44px;
        height: 44px;
    }
    .shareButton::before { background-size: 44px 44px; }
    .imageContainer#mainImage { 
        /* 254px = space for buttons; 95px = titlebar + configBar */ 
        margin: auto;
        width: 100%;
        height: calc(100vh - 60px - 95px); /* IE fallback */
        height: calc(var(--vh) - 60px - 95px);
        max-width: calc((100vh - 60px - 95px)*854/890); /* IE fallback */
        max-width: calc((var(--vh) - 60px - 95px)*854/890);
    }
    .imageContainer#mainImage .layer.shadow { top: 0; } /* for vertical centering */
}

@media screen and (max-width: 640px) and (min-height: 1200px) {
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 119px - ((1132px - 100vh)*0.5) + 21px); } /* IE fallback */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 119px - ((1132px - var(--vh))*0.5) + 21px); }
}
@media screen and (max-width: 485px) { /* share buttons stack; there's now 50px less */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 94px - ((1132px - 100vh)*0.5) + 21px); } /* IE fallback */
    body { background-position-y: calc(((854px - 100vw)*-0.2) + 94px - ((1132px - var(--vh))*0.5) + 21px); }

    body.aspectCorrect { background-position-y: calc(((1132px - 100vh)*-0.69) + 121px); } /* IE fallback */
    body.aspectCorrect { background-position-y: calc(((1132px - var(--vh))*-0.69) + 121px); }


    #mainWrapper { padding-bottom: 110px; }
    .imageContainer#mainImage { 
        height: calc(100vh - 110px - 95px);
        height: calc(var(--vh) - 110px - 95px);
        max-width: calc((100vh - 110px - 95px)*854/890);
        max-width: calc((var(--vh) - 110px - 95px)*854/890);
    }
    .socialMedia { 
        padding-bottom: 0.5em; 
        margin-top: -0.25em;
    }
}

@media screen and (max-width: 380px) {
    .selectList .partThumbnail { margin: 10px 10px 30px 10px; }
    .ui-dialog div.field input[type="text"], 
    .ui-dialog div.field input[type="email"], 
    .ui-dialog div.field textarea { width: 60%; }
    .ui-dialog div.field:not(.dealerField) label { max-width: calc(40% - 0.75em); }
    .button,
    .ui-button {  margin: 0 0.5em 1em !important; }

    #partSelector { padding-top: 80px; }
    #partSelector h2 { height: 105px; padding-top: 36px; }
    #partSelector .legend { top: 105px; }
}


.sort {
    font-size: 12px;
    margin: 1.5em 0 0.5em;
}

    @media screen and (max-width: 640px) and (min-width: 381px) { .sort { margin-top: 0.5em; } }

    .sort .sorter {
        position: relative;
        margin: 0 0.25em;
        cursor: pointer;
        padding: 0.125em 0.375em;
        display: inline-block;
        font-weight: 600;
        transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
        border-radius: 6px;
        border: 1px solid #c2c2c1;
        box-shadow: 0 0 4px #0000001a;
        background-color: #282828;
        color: white;
    }

        .sort .sorter:first-of-type { margin-left: 0.25em; }

        .sort .sorter.selected {
            background-color: #eaeaea;
            color: inherit;
            cursor: default;
        }

            .sort .sorter.selected::after {
                content: '\f00c';    
                font-family: 'Font Awesome 5 Free';
                font-weight: 900;
                font-size: 16px;
                position: absolute;
                top: -9px;
                right: -6px;
                color: #d78511;
            }
