﻿/* sticky footer*/
footer.copyright-container, .push {
    height: 20px;
}

.page-wrapper {
    margin: 0 auto -20px;
}

.appname-link {
    -moz-transition: font-size 0.5s ease;
    -o-transition: font-size 0.5s ease;
    -webkit-transition: font-size 0.5s ease;
    transition: font-size 0.5s ease;
}

/* Overall structure*/
.banner {
    min-width: 600px;
}

.banner-container {
    width: 100%;
    overflow-x: hidden;
}

section#page-content {
    min-height: calc(100vh - 101px);
}

#controls, #viz-wrapper {
    position: relative;
    float: left;
}

#controls {
    padding: 1ex 1em 11.5ex 1em;
    width: 100%;
}

    #controls .row {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 1ex;
    }

        #controls .row > div {
            width: 100%;
            float: left;
        }

.overview-only, .overview .main-only {
    display: none;
}

.overview .overview-only, .main-only {
    display: block;
}

/*default 1 outer column layout*/
#viz-wrapper {
    width: 100%;
    height: 50vh;
    position: relative;
    margin-bottom: 1ex;
}

    #viz-wrapper > div {
        height: 100%;
    }

.thumbnail {
    width: 32%;
    height: 15.3vh;
    margin: 1vh 0 0 1%;
    position: relative;
    float: left;
}

    .thumbnail .year {
        position: absolute;
        width: 100%;
        height: 100%;
        text-align: center;
        background: none;
        font-family : "Helvetica", "Calibri", sans-serif;
        font-size: 4vw;
        line-height: calc(15vh - 30px);
        letter-spacing: 2px;
        opacity: 0.7;
        text-shadow: 0 0 7px #000000;
    }

/* two outer column layout */
@media (orientation:landscape) and (min-width : 1024px) {
    #viz-wrapper {
        width: 100%;
        height: 100%;
        margin-right: -26em;
        padding-right: 27em;
        position: relative;
        min-height: calc(100vh - 121px);
        margin-bottom: 0;
    }


        #viz-wrapper > div, #treemap {
            min-height: calc(100vh - 121px);
        }

    #page-content {
        font-size: 1vw;
    }

    #controls {
        -moz-box-sizing: content-box;
        -webkit-box-sizing: content-box;
        box-sizing: content-box;
        min-height: calc(100vh - 121px - 12.5ex);
        width: 24em;
    }
    .thumbnail {
    width: 32%;
    height: calc(31vh - 31px);
    margin: 1vh 0 0 1%;
}

    .thumbnail .year {
        font-size: 7vw;
        line-height: calc(30vh - 30px);
    }
}

@media (min-width:1600px) {
    #page-content {
        font-size: 16px;
    }
}

/* two inner column with large height*/
@media (orientation:portrait) and (min-width: 640px) and (min-height: 140ex), (max-width: 1023px) and (min-width: 640px) and (min-height: 110ex) {
    #controls .row > div {
        width: 50%;
        padding: 0 1em;
    }

    #controls {
        padding: 1em 1em 1em 1em;
        min-height: 55ex;
    }

    #viz-wrapper {
        height: calc(100vh - 60ex - 100px);
    }
    .thumbnail {
        height: calc(32vh - 20ex - 33px);
    }
    #year-chart {
        padding: 1ex 1em 11.5ex 1em;
    }
}

/* Break title when */
@media (max-width:779px) {
    .appname-break {
        display: block;
    }
}

@media (max-width:599px) {
    a.appname-link {
        font-size: 18pt;
    }
}

@media (max-width:480px) {
    a.appname-link {
        font-size: 17pt;
    }
}

@media (max-width:480px) {
    footer.copyright-container, .push {
        height: 40px;
        background-repeat: repeat-y;
    }

    .page-wrapper {
        margin: 0 auto -40px;
    }

    .footer-break {
        display: block;
    }
}

/* position controls */
#legend-h {
    width: 98%;
    display: block;
}

.k-ie #legend-h {
    height:8ex;
}

.year-row {
    display: block;
    float: none;
    clear: both;
    color: white;
    font-size: 1.3em;
    padding: 0.5ex 0;
}

    .year-row > div {
        float: left;
    }

#class-details .description > div, #class-details .stats {
    margin-top: 1em;
    font-size: 1.6em;
}

#class-details .description p, #class-details .payroll, #class-details .payroll-change {
    margin: 2% 5%;
    font-size: 1.2em;
}

#sidebar-footer {
    position: absolute;
    bottom: 4ex;
    left: 1em;
}

#legend-wrapper-h > div {
    float: left;
}

#legend-wrapper-h {
    margin: 2.5ex 0 1.5ex;
}

#treemap {
    width: 100%;
    background-color: #1a688e;
}

.k-ie #treemap {
    height: 100%;
}

.footer-tile {
    padding: 0 0.5em 0 0;
}

#footer-desc {
    width: initial;
}

.footer-title {
    padding: 0;
    width: 20em;
    font-size: 1em;
}

.node-g text, div.d3-tip {
    pointer-events: none;
}

.node-g {
    pointer-events: all;
}

/*style controls*/
#controls, #viz-wrapper > div {
    background-color: #1a688e;
    color: white;
}

#play-all {
    color: black;
    border-radius: 13px;
    float: right;
    width: 5.5em;
    margin-right: 1em;
}

#legend-h text, #legend-v text {
    fill: white;
    font-family: Helvetica, Verdana, sans-serif;
    font-size: 1em;
}

#legend-wrapper-h p, #year {
    text-align: center;
}

#legend-wrapper-h p {
    font-size: 1.6em;
}

#year {
    font-size: 8em;
    line-height: 1;
    text-shadow: 1px 1px 4px #ddf;
    font-family: Helvetica, Verdana, sans-serif;
}

#year-chart {
    font-size: 0.9em;
    margin-bottom: 2ex;
}

#about, #description, #class-details .title {
    font-size: 1.4em;
}

#treemap .node-g:hover rect {
    fill: yellow !important;
}

#controls .k-slider-selection {
    background-color: initial;
}

#controls .k-draghandle:hover,
#controls .k-state-focused, #controls .k-state-focused:hover,
#controls .k-state-selected, #controls .k-state-selected:hover,
#controls .k-state-hover, #controls .k-state-hover:hover {
    background-color: #80C1D0 /*#CCE7ED*/;
    border-color: #1A68AE;
}

#navlink:link, #navlink:hover, #navlink:visited, #navlink:active {
    color: #cce7ed;
    pointer-events: all;
}

.treemap {
    width: 96%;
    margin-left: 2%;
}


/* interaction tweaks */
svg, g, rect, text {
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

.thumbnail .year {
    pointer-events: none;
}

.d3-tip {
    line-height: 1;
    font-weight: bold;
    padding: 2ex;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 2px;
    pointer-events: none;
}

    /* Creates a small triangle extender for the tooltip */
    .d3-tip:after {
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        display: inline;
        font-size: 0.8em;
        width: 100%;
        line-height: 1;
        color: rgba(0, 0, 0, 0.8);
        position: absolute;
        pointer-events: none;
    }

    /* Northward tooltips */
    .d3-tip.n:after {
        content: "\25BC";
        margin: -1px 0 0 0;
        top: 100%;
        left: 0;
        text-align: center;
    }
