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

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  --color-primary: #3265CB;
  --color-primary-lighter: #3B77E7;
  --color-neutral-dark: #323947;
  --color-neutral-base: #444655;
  --base-section-width: 1050px;
  --main-header-height: 56px;
}

* {
  font-family: 'Roboto', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}
 
html, body {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  background: var(--color-neutral-dark);
  color: var(--color-neutral-base);
  overflow: hidden;
}
 
h1 {
  margin: 0;
}

a {
  font-weight: 500;
  font-size: 0.96em;
  text-decoration: none;
  color: #5F6368;
}
a.is-active {
  color: #202124;
}

button {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 2px;
  outline: none;
  background: none;
  cursor: pointer;
}

#main-header,
#main-header > h1,
#main-header > nav {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}
#main-header {
  z-index: 1;
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  height: var(--main-header-height);
  padding: 0 16px 0 24px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.3),0 2px 6px 2px rgba(60,64,67,.3);
  background: white;
}
#main-header > h1 {
  font-weight: 500;
  font-size: 16px;
}
#main-header > h1::before {
  content: '';
  background: url('assets/firebase-logo.svg') no-repeat left center;
  background-size: auto 24px;
  height: 24px;
  width: 34px;
}
#main-header > nav {
  flex: 2;
}
#main-header > nav > a {
  position: relative;
  line-height: var(--main-header-height);
  margin-left: 32px;
}
#main-header > nav > a.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--color-primary-lighter);
}

main {
  z-index: 0;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  overflow: auto;
}

.page {
  position: relative;
  display: none;
  min-height: 100vh;
  box-sizing: border-box;
  padding-top: var(--main-header-height);
}
.page.is-active {
  display: block;
}

/* Splash page */
#splash-page {
  z-index: 10000;
  position: fixed;
  top: 0;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background: white;
}
#splash-page > h1 {
  font-size: 24px;
  font-weight: 500;
  color: black;
}
#splash-page p {
    color: black !important;
}

/* Sign-In button  */
#sign-in-button {
  height: 40px;
  padding: 0 10px;
  margin-top: 32px;
  background: white;
  color: var(--color-neutral-base);
}
#sign-in-button::before {
  content: '';
  margin-right: 12px;
  background: url('assets/google-logo.svg') no-repeat;
  background-size: 18px;
  height: 18px;
  width: 18px;
}
#sign-in-button:hover,
#sign-in-button:focus {
  outline: solid 3px var(--color-primary-lighter);
}

/* Sign-Out button  */
#sign-out-button {
  height: 40px;
  padding: 0 10px;
  color: var(--color-primary);
}
#sign-out-button:hover,
#sign-out-button:focus {
  background: #EAEFFA;
}

/* Add Post button  */
.add-post-button {
    display: inline-block;
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    margin-right: 16px;
    background: #FFA000 url('assets/post-add-white.svg') no-repeat center center;
    background-size: 18px;
    border-radius: 100%;
}
.add-post-button:hover {
    background-color: #F57F17;
}
.add-post-button.is-active {
    background-color: lightgray;
    pointer-events: none;
    cursor: initial;
}

/* New Post page */
#page-new-post {
    background: var(--color-neutral-base);
}
#page-new-post dialog {
    display: block;
    width: 500px;
    margin: 32px auto;
    padding: 16px;
    border-radius: 4px;
    border: none;
}
#page-new-post > dialog > form {
    display: flex;
    flex-flow: column nowrap;
}
#page-new-post > dialog > form > h1 {
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 24px;
    color: inherit;
}
#page-new-post > dialog > form > input,
#page-new-post > dialog > form > textarea {
    margin-bottom: 24px;
    padding: 0.5em;
    border: solid 1px var(--color-neutral-dark);
    border-radius: 2px;
}
#page-new-post > dialog > form > input:invalid,
#page-new-post > dialog > form > textarea:invalid {
    border: solid 1px red;
}
#page-new-post > dialog > form > label {
    margin-bottom: 6px;
    font-weight: 400;
    font-size: 13px;
}
#page-new-post > dialog > form > button {
    display: inline-block;
    height: 40px;
    padding: 0 10px;
    background: var(--color-primary-lighter);
    color: white;
}
#page-new-post > dialog > form > button:hover {
    background: var(--color-primary);
}

/* Posts */
#page-recent,
#page-posts,
#page-top-posts {
    background: #eaeaea;
}
.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, 320px);
    grid-gap: 24px;
    width: var(--base-section-width);
    padding: 32px 0;
    margin: 0 auto;
}
.posts-container article {
    display: flex;
    flex-flow: column nowrap;
    height: 100%;
    border-radius: 6px;
    background: white;
}
.posts-container article > header {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    padding: 8px 12px;
}
.posts-container article > header > h1 {
    flex: 2;
    margin-right: 8px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.posts-container article > header > button {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    background-position: center center;
    background-repeat: no-repeat;
}
.posts-container article > header > button.btn-star {
    background-image: url('assets/star-border.svg');
    background-size: 20px;
}
.posts-container article > header > button.btn-star.is-active {
    background-image: url('assets/star.svg');
}
.posts-container article > header > div.btn-star-count {
    flex: 0 0 auto;
    line-height: 24px;
    margin-top: 0.14em;
    font-size: 16px;
    font-weight: 700;
    color: #FFCA28;
}
.posts-container article > header > button.btn-delete {
    background-image: url('assets/delete.svg');
    background-size: 12px;
}
.posts-container article > section {
    display: flex;
    align-items: center;
    padding: 0 12px 12px;
}
.posts-container article > section:last-child {
    margin-top: auto;
}
.posts-container article > section > img {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 100%;
    overflow: hidden;
}
.posts-container article > section > h2 {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
}
.posts-container article > section > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 1.2em;
    min-height: calc(1.2em * 3);
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    overflow: hidden;
}
.posts-container article > section > form {
    display: flex;
    flex-flow: row nowrap;
    width: 100%;
}
.posts-container article > section > form > input {
    flex: 2;
    margin-right: 8px;
    padding: 0.5em;
    border: solid 1px var(--color-neutral-dark);
    border-radius: 2px;
}
.posts-container article > section > form > input:invalid {
    border: solid 1px lightgray;
}
.posts-container article > section > form > button {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    background: var(--color-primary-lighter);
    color: white;
}
.posts-container article > section > form > button:hover {
    background: var(--color-primary);
}
.posts-container article > section > ul {
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}
.posts-container article > section > ul > li {
    width: 100%;
    margin-bottom: 16px;
}
.posts-container article > section > ul > li:last-child {
    margin-bottom: 0;
}
.posts-container article > section > ul > li > header {
    display: flex;
    width: 100%;
}
.posts-container article > section > ul > li > header > img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 100%;
    overflow: hidden;
}
.posts-container article > section > ul > li > header > h3 {
    margin: 0;
    font-weight: 500;
    font-size: 13px;
}
.posts-container article > section > ul > li > header > .btn-delete-comment {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: auto;
    background: url('assets/delete.svg') no-repeat center center;
    background-size: 10px;
}
.posts-container article > section > ul > li > span {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    font-size: 13px;
}

/* Integrations page */
#page-integrations {
  background: #eaeaea;
}
#page-integrations > nav {
  width: var(--base-section-width);
  padding-top: 32px;
  margin: 0 auto;
}
#page-integrations > nav > a {
  margin-right: 24px;
  color: #202124;
  opacity: 0.72;
}
#page-integrations > nav > a.is-active {
  opacity: 1;
}
#page-integrations > section {
  width: var(--base-section-width);
  padding: 32px 0 24px;
  margin: 0 auto;
}
div.am-integrations {
  position: static;
  overflow: visible;
  background: transparent !important;
}
div.am-integrations__grid,
div.am-integrations__grid:first-child {
  background: transparent !important;
  padding: 0;
}
div.am-integration-tile {
  outline: none;
  border: none;
}
div.am-integration-tile:hover {
  outline: solid 4px #839CF8;
}

/* Automations page */
#page-automations {
  background: #eaeaea;
}
#page-automations > section {
  width: var(--base-section-width);
  padding: 24px 0;
  margin: 0 auto;
}
div.am-flow-manager {
  position: static;
}

/* Designer page */
#page-designer {
  position: absolute;
  top: var(--main-header-height);
  right: 0;
  bottom: 0;
  left: 0;
  min-height: auto;
}
