/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

html {
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images, videos, audio and canvas and the bottom of
 * their containers: h5bp.com/i/440
 */

audio,
canvas,
img,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browse Happy prompt
   ========================================================================== */

.browsehappy {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html {
    overflow-y: scroll;
}

body{
    font-family: 'Roboto', sans-serif;
}

#header{
    height: 145px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

#homelink{
    width: 299px;
    height: 125px;
    left: 50px;
    top: 20px;
    position: absolute;
    z-index: 2000;
}

#homelink span{
    width: 299px;
    height: 125px;
    left: 0;
    top: 0;
    background: url(../img/logo@1x.png) 0 0 no-repeat;
    position: absolute;
    display: block;
}

#homelink span.orange{
    background: url(../img/logo@1x-orange.png) 0 0 no-repeat;
}

#homelink span.black{
    opacity:1;
    -webkit-transition:opacity .35s;
    transition:opacity .35s;
}

#homelink:hover span.black{
    opacity:.24;
}

#sub-navigation{
    margin-left: 50px;
    margin-top: 20px;
    margin-bottom: 50px;
}

#sub-navigation a{
    margin-right: 20px;
    display: inline-block;
}

#container{
    /*position: relative;*/
}

body.page #container{
    margin-left: 50px;
    margin-right: 20px;
    max-width: 640px;
}

.tooltipster-light {
    border: 1px solid #cccccc;
    background: #FFF;
    color: #666666;
    margin-left: 10px;
    margin-right: 10px;
    max-width: 400px;
    -ms-transform: skewY(-1.5deg);
    -webkit-transform: skewY(-1.5deg);
    transform: skewY(-1.5deg);
    -ms-transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.2);
    -moz-box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.2);
    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.2);
}

.tooltipster-light .tooltipster-content {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 16px;
    padding: 8px 10px;
}

h1{
    color: #8F290D;
}

h1#modal-title{
    margin-top: 0;
}

h2{
    margin-top: 0;
}

h3{
    margin: 0 0 .5em 0 !important;
    font-size: 1.1em;
    color: #666;
}

div{
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

body.faq img{
    width: 100%;
    max-width: 400px;
}

blockquote{
    margin-left: 1.5em;
    margin-top: -.5em;
    font-style: italic;
}

.step{
    padding: 20px;
    clear: both;
}

#step1{
    position: absolute;
    right: 20px;
    top:-10px;
    z-index: 100;

    background:#b3d4fc;
    padding: 10px 5px;
    margin-top: 10px;
}

#settings-btn, #preview-btn{
    margin:0 5px;
}

#generation-options{
    display: inline-block;
}

#generation-options div{
    display: none;
    background:#D9E9FC;
    border-radius: 4px;
    padding-right: 5px;
    margin: 0 5px;
}

#generation-options label{
    display: inline-block;
    margin: 0 5px;
    font-weight: normal;
}

#step2{
    /*bottom:0px;*/
    background: #FFF;
 /*   position: absolute;*/
     position: relative;
    width: 100%;
    z-index: 10;
}

#grid-container{
    position: relative;
    display: inline-block;
}

#grid{
    position: absolute;
    top:20px;
    left: 20px;
    overflow-x: auto;
    overflow-y: auto;
    cursor: cell;
}

#preview{
    position: absolute;
    top:20px;
    right: 0;
    overflow: hidden;

    background:red;
}

body.home form, body.home #step2, body.home #grid-container, body.home table, body.home tbody, body.home tr, body.home td, body.home div{
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
         -o-user-select: none;
            user-select: none;
}

table{

}

td{
    border:1px #000 solid;
    cursor: cell;
}

td:hover{
    background: #FFD076;
}

td.active{
    background: #000;
    border-color: #555;
}

td.active:hover{
    background: url(../img/x-fff.png) #000 center center no-repeat;
}

.action-add-row{
    background: #b6d4bc;
    position: absolute;
    cursor: pointer;
    background-position: center center;
    background-image:url(../img/plus-000.png);
    background-repeat: no-repeat;
}

.remove-row{
    background: #FECCCC;
    position: absolute;
    cursor: pointer;
    background-position: center center;
    background-image:url(../img/minus-000.png);
    background-repeat: no-repeat;
}

.action-add-row:hover{
    background-color: #028102;
    background-image:url(../img/plus-fff.png);
}

.remove-row:hover{
    background-color: red;
    background-image:url(../img/minus-fff.png);
}

#action-add-top{
    top: 0;
    left: 20px;
    height: 20px;
}

#remove-top{
    top: 0;
    right: 20px;
    height: 20px;
}

#action-add-left{
    top: 20px;
    left: 0;
    width: 20px;
}

#remove-left{
    bottom: 20px;
    left: 0;
    width: 20px;
}

#action-add-right{
    bottom: 20px;
    right: 0;
    width: 20px;
}

#remove-right{
    top: 20px;
    right: 0;
    width: 20px;
}

#action-add-bottom{
    bottom: 0;
    right: 20px;
    height: 20px;
}

#remove-bottom{
    bottom: 0;
    left: 20px;
    height: 20px;
}

.move-row{
    background: #9FB2EB url(../img/arrow-up-000.png) center center no-repeat;
    cursor: pointer;
    z-index: 20;
    position: absolute;
}

#move-up{
    height: 20px;
    margin: 0 auto;
    width: 25px;
    position: relative;
}

#move-left{
    left:0;
    height: 25px;
    width: 20px;
    background-image: url(../img/arrow-left-000.png);
}

#move-right{
    height: 25px;
    right:0;
    width: 20px;
    background-image: url(../img/arrow-right-000.png);
}

#move-down{
    height: 20px;
    bottom: 0;
    width: 25px;
    background-image: url(../img/arrow-down-000.png);
}

#move-up:hover{background-image: url(../img/arrow-up-fff.png);}
#move-left:hover{background-image: url(../img/arrow-left-fff.png);}
#move-right:hover{background-image: url(../img/arrow-right-fff.png);}
#move-down:hover{background-image: url(../img/arrow-down-fff.png);}

.move-row:hover{
    background-color: #1443CF;
}

a{
    text-decoration: none;
    color: #0099CC;
}

a:hover{
    color:#FFD076;
    text-decoration: none;
}


/*---- settings ----*/

#settings-container{
    -ms-transform: skewY(-1.5deg);
    -webkit-transform: skewY(-1.5deg);
    transform: skewY(-1.5deg);
    -ms-transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    border-top: 1px #CCC solid;
    border-bottom: 1px #CCC solid;
    z-index: 3000;
    background:#FFF;
    padding: 20px;
    display: none;
}

#settings-container input[type="text"]{
    width:40px;
}

#option6 input[type="text"]{
    width: 60px;
}

.row{
    margin-bottom: 20px;
}

.option{
    margin-bottom: 15px;
}

#option2{
    height: 150px;
}

#option2 h3{
    z-index: 300;
    position: relative;
}

#grid-dimensions input, #baseplate-dimensions input{
    margin-bottom: 10px;
}

#cube-shape-preview{
    width: 100px;
    height: 92px;

    top:30px;
    left:60px;
    position: absolute;

    background: url(../img/cube-only@1x.png) 0 0 no-repeat;
}

#cube-shape-preview input{
    position: absolute;
    text-align: center;
}

/* X axis */
#cubeWidth{
    top:80px;
    left: 37px;
}

/* Y axis */
#cubeHeight{
    left: 90px;
    bottom: 30px;
}

/* Z axis */
#cubeDepth{
    top:72px;
    left: -23px;
}

#option3{
    height: 160px;
}

#baseplate-shape-preview{
    width: 150px;
    height: 133px;

    top:30px;
    left:50px;
    position: absolute;

    background: url(../img/baseplate@1x.png) 0 0 no-repeat;
}

#baseplate-shape-preview input{
    position: absolute;
    text-align: center;
}

#baseplateThickness{
    top:120px;
    left:-25px;
}

#baseplateOverlap{
    left:150px;
    top:15px;
}

#option5{
    height: 150px;
}

#sill-shape-preview{
    width: 125px;
    height: 125px;

    top:30px;
    left:30px;
    position: absolute;

    background: url(../img/sill@1x.png) 0 0 no-repeat;
}

#sill-shape-preview input{
    position: absolute;
    text-align: center;
}

#sillThickness{
    left:120px;
    top:90px;
}

#sillHeight{
    left:-10px;
    top:103px
}


/*---- gallery page ----*/

.gallery-item, .bottom-frame, .right-frame{
    background-image: url(../img/frame@1x.png);
}

.gallery-item{
    display:block;
    background-position: left top;
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    z-index: 100;
    width: 100%;
}

.gallery-item .column{
    float:left;
    margin: 20px 0 12px 20px;
    position: relative;
    z-index: 400;
}

.gallery-item .column label{
    display: block;
    margin-bottom: 10px;
    width: 150px;
    font-weight: normal;
}

.gallery-item .column label input[type="text"], .gallery-item .column label textarea{
    width: 100%;
}

.gallery-item .column textarea{
    height: 80px;
}


.parameters{
    clear: both;
    padding: 0 0 60px 0;
    margin: 0 20px;
    overflow: hidden;
    display: none;
}

dl, dt{
    margin-top: 0;
}

dt{
    font-weight: bold;
    float: left;
    margin-right: 20px;
}

dd{
    margin-bottom: 10px;
}

.gallery-image{
    height: 156px;
    width: 156px;
    border: 1px #CCC solid;
    padding: 2px;
    background:#FFF;
}

.bottom-line{
    position: absolute;
    border-bottom: 1px #000 solid;
    width: 20px;
    right: -2px;
    bottom: 0;
    height: 10px;
    z-index: 300;
}

.bottom-frame{
    background-position: left bottom;
    position: absolute;
    left: -2px;
    bottom: -2px;
    width: 100%;
    height: 20px;
    border-left: 2px #FFF solid;
    border-bottom: 2px #FFF solid;
    z-index: 250;
}

.right-frame{
    background-position: right top;
    position: absolute;
    right: -2px;
    top: -2px;
    width: 20px;
    height: 800px;
    border-right: 2px #FFF solid;
    border-top: 2px #FFF solid;
    z-index: 275;
}

.item-controls{
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 500;
    cursor: pointer;
    opacity: .2;

    -webkit-transition:opacity .15s;
    transition:opacity .15s;
}

.gallery-item:hover, .gallery-item:hover .bottom-frame, .gallery-item:hover .right-frame{
    background-image: url(../img/frame@1x-hover.png) !important;
}

.gallery-item:hover .item-controls{
    opacity: 1;
}

.preload{
    background-image: url(../img/frame@1x-hover.png) !important;
}

/*---- design modal ----*/

.spinner{
    margin:0 auto;
    width: 108px;
    height: 107px;
    background: url(../img/spinner@1x.gif);
}

/*---- footer ----*/

#footer{
}

#pxstlico{
    width: 16px;
    height: 16px;
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: url(../img/pxstl@1x.png) 0 0 no-repeat;
    z-index: 1900;
}

body.page #footer{
    margin-top: 60px;
}

.infinite-cubes{
    height: 37px;
    margin-bottom:20px;
    background: url(../img/cube@1x.png);
    -ms-transform: skewY(-1.5deg);
    -webkit-transform: skewY(-1.5deg);
    transform: skewY(-1.5deg);

    -ms-transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;

    -webkit-animation-iteration-count: infinite; /* Chrome, Safari, Opera */
    animation-iteration-count: infinite;
    -webkit-animation-play-state: paused; /* Chrome, Safari, Opera */
    animation-play-state: paused;
    -webkit-animation-duration: 1.6s;
    -webkit-animation-name: slidein;
    -animation-name: slidein;
    -webkit-animation-timing-function: linear; /* Chrome, Safari, Opera */
    animation-timing-function: linear;
}

#header .infinite-cubes{
    float: left;
    width: 100%;
    background-image: url(../img/cube-header@1x.png);
    height: 19px;
    margin-bottom: 0;
    -webkit-animation-name: slideinheader;
    -animation-name: slideinheader;
}

.first-infinity{
    margin-top: 28px;
}

.second-infinity{
    position: absolute;
    width: 100%;
    bottom: 0;
}

@-webkit-keyframes slidein {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 36px 0;
    }
}

@keyframes slidein {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 36px 0;
    }
}

@-webkit-keyframes slideinheader {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 20px 0;
    }
}

@keyframes slideinheader {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 20px 0;
    }
}

.infinite-cubes:hover {
    -webkit-animation-play-state: running; /* Chrome, Safari, Opera */
    animation-play-state: running;
}

#footer-container{
    margin-left: 50px;
    margin-right: 20px;
    max-width: 640px;
    padding: 40px 40px 100px 0;
}

#social a{
    display: block;
    float: left;
    background-image: url(../img/social@1x.png?v=1);
    width: 32px;
    height: 32px;
    margin-right: 8px;
    opacity: 1;
}

#social .facebook{}
#social .twitter{background-position: -32px 0;}
#social .pinterest{background-position: -64px 0;}
#social .rss{background-position: -96px 0;}

#social a:hover{
    -webkit-transition:opacity .15s;
    transition:opacity .15s;
    opacity: .5;
}


/*---- nav ----*/

#nav{
    -ms-transform: skewY(-1.6deg);
    -webkit-transform: skewY(-1.6deg);
    transform: skewY(-1.6deg);
    display: block;
    width: 400px;
    position: absolute;
    bottom: 40px;
    left: 410px;
}

#nav ul, #nav li{
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#nav ul{
    font-size: 20px;
}

#nav li{
    float: left;
    margin-right: 30px;
}

/*---- 404 ----*/

#game{
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

#grass, #grass2{
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    height: 61px;
    background-image: url(../img/404@1x/grass.png);
    z-index: 50;
}

.dogcow{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 41px;
    height: 32px;
    background: url(../img/404@1x/clarus.png) left bottom;

    z-index: 75;
}

.dogcow.facing-right{
    background-position: right bottom;
}

.dogcow.step1{background-position: 0 -96px;}
.dogcow.step2{background-position: 0 -64px;}
.dogcow.step3{background-position: 0 -32px;}
.dogcow.step4{background-position: 0 0;}

.dogcow.step1.facing-right{background-position: 41px -96px;}
.dogcow.step2.facing-right{background-position: 41px -64px;}
.dogcow.step3.facing-right{background-position: 41px -32px;}
.dogcow.step4.facing-right{background-position: 41px 0;}

#ufo{
    position: absolute;
    width: 136px;
    height: 26px;
    left:40%;
    top: -30px;
    opacity: 0;
    z-index: 100;
}

#ship{
    position: absolute;
    width: 136px;
    height: 26px;
    background: url(../img/404@1x/ufo.png) left bottom;
    left:0;
    top:0;
    z-index: 1000;
}

#ufo.beamoff #beam{
    opacity:0;
}

#beam{
    bottom: -193px;
    left: 24px;
    position: absolute;
    width: 88px;
    height: 193px;
    background: url(../img/404@1x/beam.png) left bottom;
    z-index: 10000;
    opacity: 1;
    -webkit-transition:opacity .35s;
    transition:opacity .35s;
}

/* CSS for high-resolution devices */
@media only screen and (-Webkit-min-device-pixel-ratio: 1.5),
only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5) {
    #homelink span.black{
        background-image: url(../img/logo@2x.png);
        background-size: 299px 125px;
    }
    #homelink span.orange{
        background-image: url(../img/logo@2x-orange.png);
        background-size: 299px 125px;
    }
    #cube-shape-preview{
        background-image: url(../img/cube-only@2x.png);
        background-size: 100px 92px;
    }

    #baseplate-shape-preview{
        background-image: url(../img/baseplate@2x.png);
        background-size: 150px 133px;
    }

    #sill-shape-preview{
        background-image: url(../img/sill@2x.png);
        background-size: 125px 125px;
    }

    .gallery-item, .bottom-frame, .right-frame{
        background-image: url(../img/frame@2x.png);
        background-size: 800px 800px;
    }

    .gallery-item:hover, .gallery-item:hover .bottom-frame, .gallery-item:hover .right-frame{
        background-image: url(../img/frame@2x-hover.png) !important;
    }

    .preload{
        background-image: url(../img/frame@2x-hover.png) !important;
    }

    .spinner{
        background-size: 108px 107px;
        background-image: url(../img/spinner@2x.gif);
    }

    .infinite-cubes{
        background-image: url(../img/cube@2x.png) !important;
        background-size: 36px 37px;
    }

    #header .infinite-cubes{
        background-image: url(../img/cube-header@2x.png) !important;
        background-size: 20px 19px;
    }

    #pxstlico{
        background-image: url(../img/pxstl@2x.png);
        background-size: 16px 16px;
    }

    #grass{
        background-image: url(../img/404@2x/grass.png);
        background-size: 216px 61px;
    }

    .dogcow{
        background-image: url(../img/404@2x/clarus.png);
        background-size: 82px 128px;
    }

    #ship{
        background-image: url(../img/404@2x/ufo.png);
        background-size: 136px 26px;
    }

    #beam{
        background-image: url(../img/404@2x/beam.png);
        background-size: 88px 193px;
    }
}

/*---- utility ----*/

.pull-right{
    float: right;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
