/* 
    Document   : base_styles
    Created on : December 12, 2012
    Author     : Theodore Brown
    Description: These styles will be applied to all devices
*/

@media only screen and (min-device-width: 1366px), (min-device-height: 1366px) {
    @-ms-viewport {width: device-width;} /* so snapped views on Windows 8 will be responsive */
}

html {
    -webkit-text-size-adjust:none;/* so font sizes will be correct on iOS */
    /*-webkit-tap-highlight-color: rgba(0,0,0,0);/* so I can customize the active state of buttons */
}

html, body {
    height: 100%;
    min-width: 280px;
    font-size: 100%;
    background-color: #ddd;
    margin: 0;
}

#pull {height: 6.5em;}
#push {height: 3.125em;}
#wrapper {
    max-width: 55em; /* 880px */
    margin-top: -6.5em; /* 104px */
    margin-bottom: -3.125em;
    margin-left: auto;
    margin-right: auto;
    background-color: #fff;
    min-height: 100%;
    box-shadow: 0 0 15px -2px #555;
}
#header, #footer {
    font-family: Verdana, sans-serif;
    background-color: #333;
    background-image: url('../images/site/background.png');
    color: #eee;
}
#header {
    height: 6.5em;
    position: relative;
    z-index: 2;
}
#footer {height: 3.125em; /* 50px */}
#footer p {
    font-size: 0.875em; /* 14px */
    line-height: 1.5em;
    padding: 1.0357em; /* center the footer text vertically */
    text-align: center;
    margin: 0; /* so the footer doesn't overflow the body */
}
#footer p a {
    color: #eee;
    text-decoration: none;
}
#footer p a:hover {text-decoration: underline;}
#footer p a:active {color: #f64800;}

#logo {
    /* secondary color: #f64800 */
    font-size: 2.2em;
    font-weight: normal;
    font-family: "Segoe UI", Helvetica, sans-serif;
    background-image: url('../images/site/logo@2x.png');
    background-size: 75px 25px;
    background-repeat: no-repeat;
    background-position: right bottom;
    padding-bottom: 0.52em;
    padding-right: 0.84em;
    margin-left: 5%;
    position: relative;
    top: 0.3em;
    float: left;
    width: 6.09em;
    cursor: default;
    line-height: 0.95em;
}

#logo > #how_to {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.36em;
    width: 2.5em;
    text-align: right;
    line-height: 1.3em;
}

#nav {
    display: inline-block;
    margin-left: 0.7em;
    /* should be centered vertically within the 6.5em high header */
    margin-top: 1.55em;
    position: relative;
    overflow: hidden;
    height: 3.2em;
    width: 250px;
    transition-property: height;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}
#nav.open {height: 307px;}

#nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: block;
}

#dropdownArrow {
    display: inline-block;
    width: 14px;
    height: 7px;
    margin-left: 10px;
    margin-top: -5px;
    background-image: url('../images/site/openCloseArrow@2x.png');
    background-size: 14px 7px;
    background-repeat: no-repeat;
    background-position: center;
    transition-property: transform;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    position: relative;
    top: -8px;
}
#nav.open #dropdownArrow {
    -webkit-transform: rotate(-180deg);
    transform: rotate(-180deg);
}

#nav ul li a {
    display: block;
    font-size: 2em;
    line-height: 1.2em;
    padding: 0.2em 0.4em; /* make room for the drop-down arrow on the right */
    text-decoration: none;
    color: #eee;
    cursor: pointer;
}

#selectedNav {
    position: relative;
    z-index: 5; /* above the dropdown nav */
    background-image: url('../images/site/background.png');
}

#dropdownNav {
    position: absolute;
    width: 250px;
    z-index: 1;
    bottom: 0; /* stick to the bottom of #nav */
    background-color: #333;
    background-image: url('../images/site/background.png'); 
    box-shadow: 2px 2px 12px -2px #333;
}

#nav a:hover {background-color: #f64800;}

#content {
    padding: 2em; /* 32px */
    color: #000;
}

h1,h2,h3,h4,h5,h6 {margin: 0;}

#content p {line-height: 1.5em;}
#content h2 {font-size: 1.5em;}
#content p, #content h2 {font-family: Georgia, serif;}
#content img {max-width: 100%;}

.clear {clear: both;}

.portrait {max-height: 28.75em;}
.landscape {width: 28.75em;}

.right_photo {
    float: right;
    padding-left: 1em;
}
.left_photo {
    float: left;
    padding-right: 1em;
}
.right_photo, .left_photo {padding-bottom: 1em;}

.hide-text {
    /* 
    Thanks to Jeffrey Zeldman for this styling tip:
    http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
    */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.cache_photo {
    /* hold hidden photos to cache them */
    display: none;
}

#shutter_speeds_container {
    max-width: 490px;
    float:right;
    margin-left: 1em;
}

#shutter_speeds {
    font-family: sans-serif;
    border-collapse: collapse;
}
#shutter_speeds, #shutter_speeds tr {
    border: 1px solid #555;
}
#shutter_speeds td, #shutter_speeds th {
    padding: 0.25em;
}

.center {text-align: center;}

@media only screen and (max-width: 699px) {
    #content img.landscape {
        float: none;
        display: block;
        margin: auto;
        padding-left: 0;
        padding-right: 0;
    }
    #shutter_speeds_container {
        float: none;
        margin: auto;
    }
}

@media only screen and (max-width: 549px) {
    #content img.portrait {
        float: none;
        display: block;
        margin: auto;
        padding-left: 0;
        padding-right: 0;
    }
}