* {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    vertical-align: baseline;
    list-style-type: none;
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

:focus {
    outline: 0;
}

html {
    font-size: 8px;
}

body {
    background-color: black;
    overflow: hidden;
    position: absolute;
    height: 100%;
    width: 100%;
}

.clear {
    clear: both;
}

.clear.padded {
    height: 2rem;
}

body > * {
    display: block;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
}

body > script {
    display: none;
}

a, a:link, a:visited {
    text-decoration: none;
}

/* Navigation bar */

body > nav {
    background-color: #fefefe;
    width: 7rem;
    max-width: 95%;
    /*transition: width 0.3s cubic-bezier(.4,0,.2,1);*/
    z-index: 2;
    position: absolute;
    overflow-y: auto;
    left: 0;
}

/*body > nav:before {
    background-image: linear-gradient(to left, rgba(0, 0, 0, 0.2), transparent);
    pointer-events:none;
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 2rem;
    height: 100%;
}*/

body > nav header {
    padding: 0.5rem;
}

body > nav.active {
    width: 45rem;
}

body > div.drawer:not(.empty) ~ main,
body > div.drawer:not(.empty) ~ nav,
body > div.dialog:not(:empty) ~ main,
body > div.dialog:not(:empty) ~ nav,
body > nav.active + main {
    opacity: 0.5;
    pointer-events: none;
}

body > nav li { /* Little hack for the navbar */
    overflow: hidden;
}

@media screen and (max-width: 1024px) {
    body > nav:not(.active) {
        width: 45rem;
        transform: translateX(-100%);
    }

    body > nav:not(.moving) {
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }

    body > nav.active:not(.moving) {
        transform: translateX(0%);
    }
}

body > nav li span.counter {
    left: 3.5rem;
    top: calc(50% - 1.25rem);
    right: auto;
    font-size: 1.75rem;
    padding: 0.25rem;
}

@media screen and (min-width: 1680px) {
    body > nav,
    body > nav:hover {
        width: 15%;
    }

    body > nav ~ main,
    body > nav:hover ~ main {
        width: 85%;
    }
}

body > nav.active:before {
    display: none;
}

/* Main */

main {
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    background-color: white;
    transition: opacity 0.3s ease-in-out;
    transform: translateZ(0);
    overflow-y: none;
}

nav ~ main {
    width: calc(100% - 7rem);
    transform: translateZ(0);
}

main > section {
    height: 100%;
    position: relative;
    overflow-y: auto;
}

main > section > div {
    overflow-y: auto;
    display: block;
    float: left;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

main > section > div.fixed {
    height: calc(100% - 7rem);
    top: 7rem;
}

main > section > div:not(:last-child) {
    border-right: 1px solid #DDD;
}

main > section > div > * {
    max-width: 84rem;
    margin: 0 auto;
}

/* Prevent fixed issues on Chrome Android */
main > section > div:first-child:nth-last-child(2) ~ div > div {
    position: relative;
}

/* Two blocks*/
main > section > div:first-child:nth-last-child(2) {
    width: 30%;
}
main > section > div:first-child:nth-last-child(2) ~ div {
    width: 70%;
    position: absolute;
    right: 0;
}

@media screen and (min-width: 1025px) {
    main > section > aside {
        width: calc(50% - 20rem);
        float: right;
        max-height: 100%;
    }

    main > section > aside > * {
        max-width: 45rem;
        margin-left: 1rem;
        margin-right: auto;
    }

    main > section > aside + div {
        overflow-y: hidden;
        width: calc(50% + 20rem);
        float: left;
        height: auto;
    }

    main > section > aside + div > * {
        max-width: 84rem;
        margin-right: 1rem;
    }
}
/*
main > section > div:first-child:nth-last-child(2) ~ div {
    background-color: white;
}*/

main > section > div > div.contained { /* Specific behaviour when the scroll need to be inside the block */
    height: calc(100% - 7.5rem);
    overflow-y: scroll;
    position: absolute;
    max-width: 100%;
    width: 100%;
}

main > section > div > div.contained > * {
    max-width: 100rem;
    margin: 0 auto;
}

@media screen and (max-width: 1024px) {
    /* Two blocks*/
    main > section > div:first-child:nth-last-child(2) {
        width: 100%;
    }
    main > section > div:first-child:nth-last-child(2) ~ div {
        width: 100%;
        left: 100%;
        z-index: 1;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.23), 0 0 10px rgba(0, 0, 0, 0.16);
        overflow-y: visible;
    }

    main > section:not(.enabled) > div:not(:first-child) {
        display: none;
    }

    main > section.enabled > div:first-child:nth-last-child(2) {
        display: none;
    }

    main > section.enabled > div:first-child:nth-last-child(2) ~ div {
        left: 0;
    }

    main,
    nav ~ main {
        width: 100%;
    }

    body > nav {
        width: 0;
    }

    aside {
        display: none;
    }

    main > section:not(.enabled) > aside + div:not(:first-child) {
        display: block;
    }
}

main footer {
    font-size: 2rem;
}

/* Actions bar */

.actions {
    padding-bottom: 7rem;
}

.actions > div:last-child {
    background-color: white;
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    bottom: 0;
    padding: 0.5rem;
    position: absolute;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.actions > div.no_bar:last-child {
    border-top: none;
}

.actions.fixed > div:last-child {
    position: fixed;
    min-height: 7rem;
    max-width: calc(100% - 5rem);
    width: 100%;
    padding: 0;
}

.actions > div:last-child form > div {
    min-height: 0;
    top: -0.5rem;
}

.actions > div:last-child form > div input {
    margin: 0;
    padding-top: 1.5rem;
}

.drawer.actions > div:last-child ul.tabs {
    margin-top: -0.5rem;
    /*margin-bottom: 0.5rem;*/
    padding-bottom: 0.5rem;
    border-bottom: 0;
    overflow-x: auto;
}

.drawer.actions > div:last-child ul.tabs li.active {
    border-top-width: 2px;
    border-top-style: solid;
    border-bottom-width: 0;
}

.actions.scroll > section {
    margin-bottom: 1rem;
}

.actions.scroll > section > article > section {
    padding: 0;
}

main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last-child  {
    max-width: calc(75% - 5rem);
}

.actions.fixed > div:last-child > * { /* Little hack to fake the 100% width that overflow the parent */
    max-width: 84rem;
    margin: 0 auto;
}

@media screen and (max-width: 1024px) { /* Known bug, on some intermediary resolution, the content is cropped */
    main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last-child {
        max-width: 100%;
    }
}

/* Hr */

hr:not(.clear) {
    border-bottom: 1px solid;
}

/* Spin */

.spin:empty {
    background-image: url(../img/movim_cloud.svg);
    background-repeat: no-repeat;
    background-position: center center;
    min-height: 30rem;
}

.spin {
    min-height: 80%;
}

/* Placeholder */

.placeholder {
    text-align: center;
    font-size: 1.2em;
    max-width: 400px;
    padding: 0 2rem;
    padding-bottom: 2rem;
    margin: 0 auto;
}

.placeholder h1 {
    color: #888;
    line-height: 5rem;
    padding-bottom: 2rem;
}

.placeholder h4 {
    color: #AAA;
}

.placeholder p {
    text-align: center;
}

.placeholder.icon {
    background-image: url(../img/icons/chat.svg);
    background-size: 25rem;
    padding-top: 30rem;
    background-repeat: no-repeat;
    background-position: center 4em;
}

.icon.news      { background-image: url(../img/icons/receipt.svg); }
.icon.forum     { background-image: url(../img/icons/forum.svg); }
.icon.contacts  { background-image: url(../img/icons/group.svg); }
.icon.account   { background-image: url(../img/icons/perm_identity.svg); }
.icon.pages     { background-image: url(../img/icons/pages.svg); }
.icon.bookmark  { background-image: url(../img/icons/bookmark.svg); }
.icon.clipboard { background-image: url(../img/icons/person.svg); }
.icon.search    { background-image: url(../img/icons/search.svg); }
.icon.blog      { background-image: url(../img/icons/description.svg); }
.icon.gallery   { background-image: url(../img/icons/collections.svg); }
.icon.share     { background-image: url(../img/icons/share.svg); }
.icon.chat      { background-image: url(../img/icons/comment.svg); }

/* Padded */

@media screen and (max-width: 800px) {
    .padded {
        padding: 2rem;
        box-sizing: border-box;
    }

    .padded_right {
        padding-right: 2rem;
        box-sizing: border-box;
    }

    .padded_top_bottom {
        padding: 0 2rem;
        box-sizing: border-box;
    }
}

/* Display/hide */

.on_mobile {
    display: none !important;
}

@media screen and (max-width: 1024px) {

.on_mobile {
    display: inherit !important;
}

.on_mobile.zmdi {
    display: inline !important;
}

.on_desktop {
    display: none !important;
}

}

/* Tag */
.tag {
    font-size: 1.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
}

/* Disabled */

.faded {
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    opacity: 0.5;
}

.recessed {
    opacity: 0.75;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Spinner */

div#spinner{
    position: relative;
    overflow: visible;
    text-align: center;
    margin: 50% 0;
}

.show{
    display: block;
}
.hide{
    display: none;
}
