﻿/* Common Helper Styles */
.vertical-center-cell {
    display: table-cell;
    vertical-align: middle;
}

.border-box-sizing {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.preserve-space {
    white-space: pre-wrap;
}

.link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    bottom: 0;
}

.fill-container {
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Common Tile Style */
.tile-base {
    float: left;
    height: 200px; /* If changing this the line-height in .center-text-tile must be changed also taking into account the padding and height set in this class */
}

.tile-wrapper {
    height: 100%;
    padding: 10px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.inner-tile {
    height: 100%;
    width: 100%;
    display: table;
}

.center-text-tile {
    text-align: center;
    line-height: 150px; /* For vertical centering this should be the same as the tile height minus 10px (2 x padding) set in .tile-base */
}

.document-tile {
    width: 25%;
    height: 125px;
}

.tile-base, .inner-tile, .tile-wrapper {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.navigation-link-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.tile-image-cell {
    width: 96px; /* Alter this value to support images of a different size on the tiles */
    text-align: center;
}

.tile-image-cell > img {
    max-height: 155px;
}

/* Common Text Styles */

.title-row {
    padding: 5px 32px 5px 0; /* for presereving visibility of the document image when text wraps along side it */
}

.details-row, .title-row {
    margin-bottom: 5px;
}

.details-heading {
    padding: 5px 0;
}

.details-heading, .details-text {
    -ms-word-wrap: break-word;
    word-wrap: break-word;
}

/* Login Module */
#login-outer {
    display: table;
}

#login-container {
    height: 300px;
    display: table;
}

#sign-in-text {
    margin: 0 20px;
    line-height: 76px;
}

#login-logo {
    float: right;
    margin: 10px 10px 0 10px;
    vertical-align: middle;
}

#login-details {
    margin: auto;
    padding: 2px 10px 10px 10px;
    clear: both;
}

#login-error {
    margin: 16px 0;
    padding: 5px;
}

    #login-error img {
        margin-right: 5px;
    }

.login-parameter-text {
    padding: 5px 0;
}

.login-parameter-input {
    width: 100%;
    border: 0 none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 5px 0;
    padding: 3px;
}

#login-button {
    margin: 10px auto;
    width: 100px;
    display: block;
    padding: 10px;
    border: 0;
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-decoration: none;
    text-align: center;
}

.login-information {
    line-height: 150%;
    margin-top: 5px;
}

/* settings icon in line with nav icons */

#settings-container {
    float: right;
    position: relative;
    right: 10px;
}

/* default nav properties*/
nav .mdl-navigation {
    margin: 0 auto;
    padding: 2px 10px;
    max-width: 1400px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

ul .mdl-navigation {
    list-style-type: none;
    margin: 0;
    padding: 0 20px;
}

.mdl-navigation li {
    display: inline;
    float: left;
    margin-right: 16px;
    padding: 5px 0;
}

.mdl-navLink {
    padding: 0 12px;
    display: inline-block;
}

.mdl-navLink:hover {
    border-radius: 3px;
}

.text-navLink {
    vertical-align: middle;
}

.img-navLink {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Projects Module */
#projects-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 10px;
    overflow: hidden; /* add height to div as it contains floated elements */
    max-width: 1400px;
}

.project-alias {
    display: inline-block; /* The background should be just around the text */
    margin: 0 5px 10px 5px;
    padding: 0 10px;
    border-radius: 3px;
}

.project-description {
    padding: 0 5px 5px 5px;
}

/* Safely removed - superfluous now we have a navbar */
#history-tile, #projects-tile {
    display: none;
}

/* History Module */
#history-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 20px auto 0 auto;
    padding: 0 10px;
    overflow: hidden; /* add height to div as it contains floated elements */
    max-width: 1400px;
}

/* Specification Navigation */
#metro-navigation-container {
    width: 100%;
    text-align: center;
}

/* Specification Details Module */
#spec-details-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 20px auto 0 auto;
    padding: 10px;
    overflow: hidden; /* Gives height to the parent container if it contains floated child elements */
    max-width: 1400px;
}

#spec-details-panel {
    height: 210px;
    margin: 8px;
    padding: 0;
    overflow: hidden; /* Gives height to parent container as it contains floated elements */
}

#back-button-container {
    float: left;
    width: 100px;
    position: relative;
    margin-right: 20px;
}

#back-image-container {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 10%;
    margin-top: -16px; /* Half of the height of the image for vertical alignment */
    background: url('navLeftDark.png') no-repeat;
}

#back-button-image {
    margin: 0 auto;
    display: block;
    height: 32px; /* Must know the height of the image for vertical alignment to work */
}

#spec-details {
    overflow: hidden;
    position: relative;
}

#back-button-container, #spec-details {
    height: 100%;
}

#spec-details-inner {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: table;
}

.document-image-placeholder {
    margin-right: 32px; /* Width of the document image to allow for wrapping around the background image */
}

.action-text {
    text-align: center;
}

.filter-container {
    width: 100%;
    margin: 0;
    padding: 10px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.filter-background {
    padding: 8px 0;
}

.filter-title {
    float: left;
    padding-top: 2px;
    padding-right: 8px;
}

.filter-box {
    border: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 5px 0;
    padding: 5px;
    width: 100%;
}

nav a.naMenu {
    display: none;
}

/* Older web enabled phones and small form factor devices */
@media only screen and (max-width: 240px) {

    /* Login - (Login to Nav to Projects to History to Search/Filter to Spec Details seems like a logical path for defining styles) */
    #login-container, #login-details {
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Navigation */
    #settingsIcon, span.layoutSwitch {
        display: none;
    }

    nav ul {
        display: none;
        height: auto;
    }

    nav a.navMenu {
        display: block;
        width: 100%;
        position: relative;
    }

        nav a.navMenu:after {
            content: "";
            width: 100%;
            height: 56px;
            display: inline-block;
            position: absolute;
            background-image: url('navIcon.png');
            background-repeat: no-repeat;
            background-position-x: 20px;
            background-position-y: 12px;
        }

    ul .mdl-navigation {
        height: auto;
    }

    .mdl-navigation li {
        padding: 10px 0;
        display: block;
        float: none;
        width: 100%;
    }

    /* Projects */
    #projects-container {
        margin: 56px auto 0 auto; /* This should match the height of a.navMenu:after */
    }

    /* History */
    #history-container {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        margin: 120px auto;
        padding: 0 20px;
        overflow: hidden;
    }

    /* Search Box */
    .filter-container {
        width: 100%;
        margin: 0;
        padding: 10px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
        margin: 76px auto 0 auto;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile, .action-tile {
        width: 100%;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding: 8px 0;
    }

    .loadingOverlayDetails {
        max-width: 180px;
    }
}

/* iPhones in portrait orientation and older web enabled phones in landscape */
@media only screen and (min-width: 241px) and (max-width: 399px) {
    /* Login */
    #login-container, #login-details {
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /*Header Image*/
    .bodyHeaderImage {
        margin: 0;
    }

    /* Navigation */
    #settingsIcon, span.layoutSwitch {
        display: none;
    }

    nav ul {
        display: none;
        height: auto;
    }

    nav a.navMenu {
        display: block;
        width: 100%;
        position: relative;
    }

        nav a.navMenu:after {
            content: "";
            width: 100%;
            height: 56px;
            display: inline-block;
            position: absolute;
            background-image: url('navIcon.png');
            background-repeat: no-repeat;
            background-position-x: 20px;
            background-position-y: 12px;
        }

    ul .mdl-navigation {
        height: auto;
    }

    .mdl-navigation li {
        padding: 10px 0;
        display: block;
        float: none;
        width: 100%;
    }

    /* Projects */
    #projects-container {
        margin: 56px auto 0 auto; /* This should match the height of a.navMenu:after */
    }

    /* History */
    #history-container {
        margin: 76px auto 0 auto;
    }

    /* Search Box */
    .filter-container {
        width: 100%;
        margin: 0;
        padding: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Specification Details */
    #spec-details-container {
        margin: 76px auto 0 auto;
        padding: 16px;
    }

    #spec-details-panel {
        margin: 8px 0;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 100%;
    }

    .action-tile {
        width: 100%;
        max-height: 125px;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding: 8px 0;
    }

    .loadingOverlayDetails {
        max-width: 220px;
    }
}

/* iPhones in landscape and other smartphones in portrait */
@media only screen and (min-width: 400px) and (max-width: 599px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
        /*Header Image*/
    }

    .bodyHeaderImage {
        margin: 0;
    }

    /* Navigation */
    #settingsIcon, span.layoutSwitch {
        display: none;
    }

    nav ul {
        display: none;
        height: auto;
    }

    nav a.navMenu {
        display: block;
        width: 100%;
        position: relative;
    }

        nav a.navMenu:after {
            content: "";
            width: 100%;
            height: 40px;
            display: inline-block;
            position: absolute;
            background-image: url('navIcon.png');
            background-repeat: no-repeat;
            background-position-x: 20px;
            background-position-y: center;
        }

    ul .mdl-navigation {
        height: auto;
    }

    .mdl-navigation li {
        padding: 10px 0;
        position: relative;
        float: left;
        width: 100%;
    }

    /* Projects */
    #projects-container {
        margin: 40px auto 0 auto; /* This should match the height of a.navMenu:after */
    }

    /* History */
    #history-container {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        margin: 76px auto 0 auto;
        overflow: hidden;
    }

    /* Search Box */
    .filter-container {
        width: 100%;
        margin: 0;
        padding: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Specification Details */
    #spec-details-container {
        margin: 76px auto 0 auto;
        padding: 20px;
    }

    #spec-details-panel {
        margin: 8px 0;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 100%;
    }

    .action-tile {
        width: 100%;
        max-height: 125px;
    }

    /* Common */
    .tile {
        width: 100%;
    }

    .tile-base {
        padding: 8px 0;
    }

    .loadingOverlayDetails {
        max-width: 380px;
    }
}

/* Kindle Fire in portrait */
@media only screen and (min-width: 600px) and (max-width: 767px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /* Header Image */
    .bodyHeaderImage {
        margin: 0 0 0 10px;
    }

    /* Navigation */
    span.layoutSwitch {
        display: none;
    }

    ul .mdl-navigation {
        display: block;
        height: auto;
    }

    .mdl-navigation li {
        display: inline;
        float: left;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
        padding: 20px;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 50%;
        padding: 8px;
    }

    .action-tile {
        width: 50%;
        max-height: 125px;
        padding: 8px;
    }

    /* Commom */
    .tile {
        width: 50%;
        padding: 10px;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }

    .loadingOverlayDetails {
        max-width: 500px;
    }
}

/* iPads and tablets in portrait and smartphones in landscape */
@media only screen and (min-width: 768px) and (max-width: 959px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }
    /*Header Image*/
    .bodyHeaderImage {
        margin: 0 0 0 10px;
    }

    /* Navigation */
    span.layoutSwitch {
        display: none;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
        margin: 20px auto;
        padding: 20px;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 50%;
        padding: 8px;
    }

    .action-tile {
        width: 50%;
        max-height: 125px;
        padding: 8px;
    }

    /* Common */
    .tile {
        width: 50%;
        padding: 10px;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
}

/* The widest layout for tablets and desktops */
@media only screen and (min-width: 960px) and (max-width: 1600px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /*Header Image*/
    .bodyHeaderImage {
        margin: 0 0 0 10px;
    }

    /* Specification Details */
    #spec-details-container {
        width: 100%;
        margin: 20px auto;
        padding: 20px;
    }

    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 33.3333%;
        padding: 8px;
    }

    .action-tile {
        width: 16.66665%;
        height: 125px;
        padding: 8px;
    }

    /* Common */
    .tile {
        width: 33.333%;
        padding: 10px;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
}

/* Large desktops */
@media only screen and (min-width: 1601px) {
    /* Login */
    #login-container {
        width: 320px;
        margin: auto;
    }

    #login-details {
        width: 280px;
    }

    /*Header Image*/
    .bodyHeaderImage {
        margin: 0 250px;
    }

    .bodyHeaderImageSmall {
        display: none;
    }

    /* Specification Details */
    #back-button-container {
        width: 20%;
        background: url(navLeftDark.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-color: #fff;
    }

    #back-button-image {
        display: none;
    }

    .document-tile {
        width: 25%;
        height: 125px;
        padding: 8px;
    }

    .action-tile {
        width: 15%;
        max-height: 125px;
        padding: 8px;
    }

    /* Common */
    .tile {
        width: 33.333%;
        padding: 10px;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
}
