/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html, body {
    font-family: 'Roboto', 'Helvetica', sans-serif;
}
a {
    text-decoration: underline;
    color: #039BE5;
}
.mdl-menu a {
    text-decoration: none;
}
.content {
    max-width: 1024px;
}
.mdl-card {
    display: block;
}
h3 {
    background: url('firebase-logo.png') no-repeat;
    background-size: 40px;
    padding-left: 50px;
    background-position-y: -2px;
}
.mdl-textfield {
    width: 100%;
}
/* Fixes an MDL bug where the header does not scroll on small devices */
.mdl-layout__container .mdl-layout--fixed-header .mdl-layout__content {
    overflow-y: visible;
    overflow-x: visible;
    overflow: visible;
}
/* Overrides MDL colors */
.mdl-layout.is-upgraded .mdl-layout__tab.is-active::after,
.header .mdl-textfield__label:after {
    background-color: #FFCA28;
}
.mdl-snackbar__action {
    color: #FFCA28;
}
.mdl-textfield__label:after {
    background-color: #0288D1;
}
.mdl-textfield--floating-label.is-focused .mdl-textfield__label {
    color: #0288D1;
}

/* Header */

.logo {
    font-family: 'Amaranth', sans-serif;
}
.logo .material-icons {
    top: 4px;
    font-size: 32px;
    margin-right: -2px;
    position: relative;
}
.header .mdl-layout__header-row {
    max-width: 1024px;
    width: 100%;
    height: auto;
    padding: 10px 20px;
    margin: auto;
    position: relative;
}
@media screen and (max-width: 840px) {
    .header .mdl-layout__header-row.titlebar {
        height: 56px;
    }
    .titlebar h3 {
        font-size: 24px;
    }
    .titlebar h3 .material-icons {
        top: 2.5px;
        font-size: 23px;
    }
}
@media screen and (max-width: 479px) {
    .mdl-grid {
        padding: 0;
    }
    .mdl-card {
        font-size: 14px;
    }
}

/* Signed-in user */

.avatar {
    height: 32px;
    width: 32px;
    display: inline-block;
    background-size: 32px 32px;
    border-radius: 32px;
    border: 2px white solid;
    margin-right: 10px;
    background-image: url('./silhouette.jpg');
}
.username {
    display: inline-block;
    line-height: 38px;
    vertical-align: top;
    width: calc(100% - 46px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
#sign-in-button {
    margin-left: 10px;
    color: inherit;
}
#sign-out-button {
    margin: 10px;
    color: inherit;
}
.mdl-button .material-icons {
    margin-top: -2px;
}
.mdl-button.mdl-button--icon .material-icons,
.mdl-button.mdl-button--fab .material-icons {
    margin-top: 0;
}

/* Navigation Bar */

.header .mdl-tab {
    padding-left: 23px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;
    margin: auto;
    max-width: 1024px;
}
@media screen and (max-width: 609px) {
    .header .mdl-tab {
        width: auto;
    }
}
.header .tab {
    padding: 0;
    max-width: none;
}
#add {
    position: absolute;
    right: 20px;
    top: 18px;
    z-index: 998;
}
@media screen and (max-width: 840px) {
    #add {
        position: fixed;
        bottom: 10px;
        right: 10px;
        z-index: 998;
        top: auto;
    }
}
#sign-out-button {
    right: 0;
    position: absolute;
}

/* Drawer */

.mdl-layout__drawer-button {
    display: none;
}
.mdl-layout__drawer .mdl-navigation .mdl-navigation__link.is-active,
.is-active .mdl-menu__item {
    color: black;
    background-color: #EBEBEB;
}
.mdl-layout__drawer {
    border-right-width: 0;
}
.mdl-navigation__link .material-icons, .mdl-menu__item .material-icons {
    position: relative;
    margin-top: -2px;
    margin-right: 10px;
}
.mdl-menu__item .material-icons {
    top: 7px;
}
@media screen and (max-width: 479px) {
    .mdl-layout__drawer-button {
        display: block;
        top: 3px;
    }
}

/* New Post Page */

#page-add {
    display: block;
    text-align: center;
}
#page-add .mdl-cell {
    width: auto;
    min-width: 300px;
}
#newPictureContainer {
    margin: 0;
    max-width: 100%;
    max-height: 400px;
}
@media screen and (max-width: 479px) {
    .mdl-snackbar__action {
        margin-right: 60px;
    }
}
.comments-container .username {
    width: auto;
}
.comments-container .comment{
    display: inline-block;
    vertical-align: top;
    padding-left: 10px;
    color: grey;
    line-height: 25px;
}
.comments-container .username {
    line-height: 25px;
}

/* Post */

.post .mdl-card {
    height: 100%;
    top: 0;
    left: 0;
    min-height: 0;
}
.post .header {
    padding: 10px;
    width: calc(100% - 100px);
    display: inline-block;
}
.post .star-count {
    color: #444;
    padding: 0 10px 0 5px;
    font-weight: bold;
    display: inline-block;
    top: -10px;
    position: relative;
}
.post .comments-container {
    padding: 15px 10px 0 10px;
}
.post .text {
    padding: 0 10px;
    color: grey;
}
.post .comments-container .text {
    margin-left: 5px;
    color: #444;
    transition: all 0.2s;
}
.post .add-comment{
    flex-grow: 1;
    padding: 0 10px;
    margin-bottom: -10px;
}
.post .add-comment.mdl-textfield {
    width: 100%;
}
.post .star {
    position: absolute;
    top: 10px;
    right: 0;
}
.post .star .material-icons {
    font-size: 35px;
    color: #ffcb0c;
    cursor: pointer;
}
.post .star .material-icons:HOVER {
    opacity: 0.6;
}
.post .star .starred {
    display: none;
}

/* Splash Page */

#page-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0288D1;
    background: radial-gradient(circle, #039BE5, #01579b);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
}
