/* https://github.com/googlefonts/mulish */
@font-face {
    font-family: 'Muli';
    font-weight: 400;
    font-style: normal;
    font-stretch: normal;
    src: url(/static/c/Mulish-Regular.woff2) format('woff2');
}

@font-face {
    font-family: 'Muli';
    font-weight: 600;
    font-style: normal;
    font-stretch: normal;
    src: url(/static/c/Mulish-SemiBold.woff2) format('woff2');
}

@font-face {
    font-family: 'Muli';
    font-weight: 800;
    font-style: normal;
    font-stretch: normal;
    src: url(/static/c/Mulish-Bold.woff2) format('woff2');
}

/* layout */
html {height: 100%;}

body {
    margin: 0;
    min-height: 100%;
    color: #333;
    background: #f8f8f8;
    position: relative;
}

body.app {
    /* this is needed for the side nav to pull down all the way correctly in all situations */
    height: 100%;
}

* {font-family: 'Muli', Helvetica, sans-serif;}

header {
    /* this has to be absolute so flex items within it don't interfere with the flex items in the main part */
    /* position: absolute;
    top: 0;
    left: 0;
    right: 0; */
    background: #00527f; /* #002940 */
    padding: .5em 1em;
    overflow: overlay;
}

.header-logo {
    display: inline-block;
    line-height: 2.5em;
}

.header-logo img {
    vertical-align: -20%;
}

.dashboards {
    width: 10em;
    margin: 0 auto;
    padding-bottom: 1em;
}

header nav {
    float: right;
    line-height: 1.25em;
}

header nav a, header nav .button {
    display: inline-block;
    padding: .55em 1em;
    margin-left: 1em;
    font-weight: 600;
    border-radius: 3px;
    box-shadow: none;
    background: none;
}

header nav a:hover, header .button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .24);
    transition: all .2s ease;
}

header a, header a:active, header a:visited {
    color: #f5f5f5;
    text-decoration: none;
    text-shadow: 1px 1px 1px #000;
}

label {width: 8em; display: inline-block;}

label.for-textarea {vertical-align: top;}

label.multiline {vertical-align: -42%;}

label.option-label, label.auto-width {width: auto;}

/* logged in */
.main-container {display: flex; min-height: 100vh; box-sizing: border-box;}

.side-nav {
    display: flex;
    align-items: stretch; /* pulls the bottom down to match the end of the page/content */
}

.side-nav a {
    color: #ccc;
    display: block;
    text-decoration: none;
    padding: 1em;
    text-shadow: 1px 1px 1px #000;
    transition: all .2s ease;
}

.side-nav a:active, .side-nav a:visited {
    color: #ccc;
}

.side-nav h5 {
    color: #666;
    text-shadow: 1px 1px 1px #000;
    margin: 0 .5em .81em;
    padding-top: .75em;
}

@keyframes show {
    100% {
        transform: none;
    }
}

.dashboards-nav {
    background: #222;
    z-index: 100;
    animation: show .5s forwards;
    transform: translateX(-100%);
    text-wrap: nowrap;
}

.projects-nav {
    background: #333;
    z-index: 90;
    animation: show .5s forwards;
    transform: translateX(-100%);
}

.tasks-nav {
    background: #444;
    z-index: 80;
    /* we need this to be slightly slower so that a gap doesn't appear on first load of task pages */
    animation: show .6s forwards;
    transform: translateX(-110%);
}

.dashboards-nav a:hover {
    background: #444;
}

.projects-nav a:hover {
    background: #555;
}

.tasks-nav a:hover {
    background: #666;
}

.dashboards-nav a.active {
    background: #333;
}

.projects-nav a.active {
    background: #444;
}

.tasks-nav a.active {
    background: #555;
}

.tasks-nav .large {line-height: 1;}

main {
    flex-grow: 1;
    max-width: 80em;
    margin: 0 auto 2em auto;
    padding: 0 1em;
}

.mobile-nav {display: none;}

@media screen and (max-width: 48em) {
    .side-nav {
        transform: translateX(-100%);
        width: 0;
        overflow: hidden;
    }

    .side-nav.active {
        position: absolute;
        width: auto;
        min-height: 100%;
        animation: show .5s forwards;
    }

    .mobile-nav {
        display: block;
        background: #555;
        border: none;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 1.75em;
        height: 1.75em;
        padding: 0;
        font-size: 1rem;
        box-shadow: 2px 2px 2px #555;
    }

    .mobile-nav > span {
        display: block;
        background: #ddd;
        height: .125em;
        margin: .25em;
    }
}

/* elements */
a, a:active, a:visited {color: #127AB2;}

main a:hover {color: #333;}

h2 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 2px #ccc;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2em;
}

h4 {font-size: 1.25rem; margin-bottom: 0;}

.upload-form {margin-top: -.3em;}

input[type=password], input[type=text], input[type=email], input[type=tel], input[type=number] {
    font-size: 1rem;
    max-width: 20em;
    padding: .5em;
    border-radius: 3px;
    border-width: 1px;
}

input[type=date], input[type=time] {font-size: 1rem; padding: .5em;}

input[type=file] {width: auto; font-size: 1rem; padding: 0; border: none; margin: 0;}

input[type=submit], .button, .button:active, .button:visited {
    background: #127AB2;
    color: #f5f5f5;
    text-shadow: 1px 1px 1px #000;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5em;
    padding: .375em 1em .5em;
    margin: 0;
    text-decoration: none;
    border-radius: 3px;
    border: none;
    transition: all .2s ease;
    display: inline-block;
    box-shadow: 2px 2px 3px #888;
}

input[type=submit]:hover, .button:hover {filter: brightness(125%); color: #f5f5f5;}

input[type=submit]:disabled, input[type=submit]:disabled:hover {background: #999; filter: none;}

input[type=email]:read-only, input[type=email]:read-only:hover {background: #eee; color: #999;}

input[type=submit]:focus, .button:focus {box-shadow: 0 0 0 1px #000;}

input[type=submit].danger, .button.danger {background: #7f1c1c;}

input[type=submit].danger:hover, .button.danger:hover {background: #5b0000;}

input[type=submit].secondary, .button.secondary {
    text-shadow: 1px 1px 1px #ccc;
    background: #f8f8f8;
    border: 2px solid #127AB2;
    color: #127AB2;
}

input[type=submit].secondary:hover, .button.secondary:hover {
    background: #fff;
    text-shadow: 1px 1px 1px #999;
}

.button.secondary:disabled {background: #999; color: #fff;}

textarea {padding: 1em; height: 5em; width: 80%; font-size: 1rem;}

select {
    background: #fff;
    width: auto;
    padding: .5em;
    border-radius: 3px;
    font-size: 1rem;
}

select.placeholder {
    color: grey;
}

select.placeholder option:not(:disabled) {
    color: #333;
}

option {font-size: 1rem;}

/* utility classes */
.button-link {
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    color: #127AB2;
    font-size: inherit;
}

.flash {margin-top: 1em; padding: 0 1em;}
.flash.info {border: 1px solid blue;}
.flash.success {border: 1px solid green;}
.flash.error {border: 1px solid red;}

.info {color: blue;}
.success, .approved {color: green;}
.error, .rejected {color: red;}

span.error, span.success {margin-left: 1em;}

p.error select {color: red;}

/* change the formatting of these when they're next to a textarea, which is much taller */
.parea span.success, .parea span.error {vertical-align: 250%;}

.help {font-style: italic; color: #888;}

.large, .large:active {font-size: 125%;}

.small, .small:active {font-size: 80%;}

.smaller, .smaller:active {font-size: 60%;}

.newlines {white-space: pre-line;}

.card {
    display: block;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    /* box shadow is from the material design card */
    box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);
    margin-bottom: .5em;
    padding: 1em 1.5em;
}

.card h3 {margin-top: 0;}

a.card {text-decoration: none;}

a.card:hover {border-color: #888;}

.card h4 {margin: 0;}

.card.row {padding: 1em;}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 1em;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 1em;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-column-gap: 1em;
}

.grid-3 > span, .grid-4 > span {text-align: center;}

.grid-3 > span:first-child, .grid-4 > span:first-child {text-align: left;}

.grid-3 > span:last-child, .grid-4 > span:last-child, .grid-2.spread > span:last-child {text-align: right;}

.col {padding: 0 1em; margin-top: .3em;}

@media screen and (max-width: 48em) {
    .col {flex: 0 0 95%;}
}

.card .col {padding: .3em 1em; margin: 0;}

.project .col {width: 25%; overflow: hidden; text-overflow: ellipsis;}

.card .col input[type=date] {padding: 0;}
