/**
 * 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;

    }

    .titelbar .uname {
        position: absolute;
        right: 10px;

    }
}

@media screen and (max-width: 479px) {
    .mdl-grid {
        padding: 0;
    }

    .mdl-card {
        font-size: 14px;
    }
}

/* Signed-in user */

.avatar {
    height: 182px;
    width: 280px;

    background-size: 282px 182px;
    border-radius: 12px;
    border: 2px white solid;

    background-image: url('./silhouette.jpg');
}

.username {
    display: inline-block;
    line-height: 38px;
    vertical-align: top;
    width: calc(100% - 6px);
    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: 12px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;
    margin: auto;
    max-width: 1024px;
    min-width: 360px;
}

@media screen and (max-width: 360px) {
    .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;
}

.mdl-card__title-text {
    font-size: 20px;
    margin-right: 20px;
}

.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 .time {
    padding: 0 10px;
    color: grey;
}

.label {
    font-style: bold;
    font-size: 16px;
    color: #0288D1;
}

.post .category {
    padding: 0 10px;
    color: grey;
}

.post .edit {
    position: relative;
    top: 17px;
    right: -35px;
    cursor: pointer;
}

.post .edit .material-icons:HOVER {
    opacity: 0.7;
    color: #0288D1;
}

.post .editkey {
    position: relative;
    top: 0px;
    left: 25px;
    cursor: pointer;
}

.post .editkey .material-icons:HOVER {
    opacity: 0.7;
    color: #0288D1;
}

.post .delete {
    position: relative;
    top: 0px;
    left: 5px;
    cursor: pointer;
}

.post .delete .material-icons:HOVER {
    opacity: 0.7;
    color: #d10202;
}

.post .search {
    position: relative;
    top: 0px;
    left: 125px;
    cursor: pointer;
}

.post .search .material-icons:HOVER {
    opacity: 0.7;
    color: #0288D1;
}

.post .note {
    position: relative;
    top: -24px;
    left: 225px;
    cursor: pointer;
}

.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;
}

.delete_button {

    position: absolute;
    right: 10px;
    align-self: flex-end;
    display: flex;
    line-height: normal;
    opacity: 0.9;
    margin: 0;

}

.delete_button:hover {
    opacity: 0.6;
    cursor: pointer;
    color: #ff3232;
}

/* 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;
}


.topnav a:hover {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: #2196F3;
    color: white;
}

.topnav .search-container {
    float: right;
}

.topnav input[type=text] {
    padding: 6px;
    margin-top: 8px;
    font-size: 17px;
    border: none;
}

.header.mdl-tab.search-container button {
    float: right;
    padding: 6px 10px;
    margin-top: 8px;
    margin-right: 16px;
    background: #ddd;
    font-size: 17px;
    border: none;
    cursor: pointer;
}

.header.mdl-tab .search-container button:hover {
    background: #ccc;
}

@media screen and (max-width: 600px) {
    .topnav .search-container {
        float: none;
    }

    .topnav a,
    .topnav input[type=text],
    .topnav .search-container button {
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        margin: 0;
        padding: 14px;
    }

    .topnav input[type=text] {
        border: 1px solid #ccc;
    }

    .dropbtn {
        background-color: #4CAF50;
        color: white;
        padding: 16px;
        font-size: 16px;
        border: none;
        cursor: pointer;
    }

    .dropbtn:hover,
    .dropbtn:focus {
        background-color: #3e8e41;
    }

    #myInput {
        box-sizing: border-box;
        background-image: url('searchicon.png');
        background-position: 14px 12px;
        background-repeat: no-repeat;
        font-size: 16px;
        padding: 14px 20px 12px 45px;
        border: none;
        border-bottom: 1px solid #ddd;
    }

    #myInput:focus {
        outline: 3px solid #ddd;
    }

    .dropdown {
        position: relative;
        display: inline-block;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #f6f6f6;
        min-width: 230px;
        overflow: auto;
        border: 1px solid #ddd;
        z-index: 1;
    }

    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
    }

    .dropdown a:hover {
        background-color: #ddd;
    }

    .show {
        display: block;
    }

    .submit-button {
        background-color: #0288D1;
        ;
        /* Green */
        border: none;
        color: white;
        min-width: 100px;
        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        right: -100px;
        display: inline-block;
        font-size: 18px;
    }

    .mdc-button--raised {
        background: #1a73e8;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
    }

    .mdc-button {
        background: 0 0;
        border: none;
        border-radius: 2px;
        color: #fff;
        position: relative;
        height: 36px;
        margin: 0;
        min-width: 64px;
        padding: 0 16px;
        display: inline-block;
        font-family: "Roboto", "Helvetica", "Arial", sans-serif;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0;
        overflow: hidden;
        will-change: box-shadow;
        transition: box-shadow .2s cubic-bezier(.4, 0, 1, 1), background-color .2s cubic-bezier(.4, 0, .2, 1), color .2s cubic-bezier(.4, 0, .2, 1);
        outline: none;
        cursor: pointer;
        text-decoration: none;
        text-align: center;
        line-height: 36px;
        vertical-align: middle;
    }

    hr.new1 {
        border-top: 1px solid red;
    }

    /* Dashed red border */
    hr.new2 {
        border-top: 1px dashed red;
    }

    /* Dotted red border */
    hr.new3 {
        border-top: 1px dotted red;
    }

    /* Thick red border */
    hr.new4 {
        border: 1px solid red;
    }

    /* Large rounded green border */
    hr.new5 {
        border: 10px solid green;
        border-radius: 5px;
    }

}