/*
 Copyright (c) 2016 StrongLoop, IBM, and Express Contributors
 License: MIT
*/

/* general */

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
  font: 400 14px/1.6 "Open Sans", sans-serif;
  background: url(/images/bg.jpg);
  margin: 0;
  padding: 0;
  color: #555;
}

h1 {
  font-size: 30px;
  line-height: 36px;
}

#intro h3, #api-doc h1 {
  font-weight: normal;
}

h1, h2, h3 {
  margin: 5px 0;
  color: #353535;
  -webkit-font-smoothing: antialiased;
}

.content h1 {
  margin-bottom: 20px;
}

p em {
  font-weight: bold;
  color: #353535;
}

p {
  margin: 10px 0;
  line-height: 1.35em;
}

strong, th {
  color: #353535;
}

#overlay {
  position: fixed;
  left: 0;
  top: 0;
  background: #fff;
  opacity: 0.8;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1;
}

#home-content {
  margin: 183px 0 2% 5%;
  max-width: 900px;
  padding-right: 9%;
  display: flex;
}

#homepage-leftpane {
  min-width: 500px;
  margin-right: 30px;
  font-size: 90%;
  padding-top: 13px;
}

#homepage-rightpane {
  min-width: 500px;
  padding: 25px 30px 0px 0px;
}

#homepage-rightpane iframe {
  min-width: 100%;
  min-height: 273px;
}

#announcements {
  margin: 3px 5% 32px;
  max-width: 1005px;
  padding: 0 16px;
  background: #fdfae6;
  border: 1px solid #ebdbb7;
  border-radius: 3px;
  font-size: 0.9em;
}

#announcements ul {
  padding-left: 0;
}

#announcements li {
  list-style: none;
  margin-bottom: 16px;
}

#announcements p {
  margin: 6px 0;
}

#announcements time {
  font-weight: normal;
  margin-right: 12px;
}

#announcements p:first-child {
  font-weight: bold;
  padding-left: 20px;
  background-image: url(/images/announcement-icon.png);
  background-position: 0 3px;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  margin-bottom: 11px;
}

#install-command {
  font-family: Consolas, Monaco, "Andale Mono", monospace;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 3px;
  max-width: 375px;
}

.content {
  margin: 153px 3% 7%;
  max-width: 1090px;
  padding-left: 225px;
}

span.block-section {
  display: block;
}

li code {
  color: #333;
}

#intro h3 {
  font-size: 25px;
  margin-bottom: 10px;
}

#api-doc section {
  padding-left: 20px;
}

#api-doc > h3 {
  padding-top: 10px;
  padding-bottom: 5px;
  font-weight: bold;
  font-size: 24px;
  color: #888;
}

#api-doc h2 {
  font-weight: bold;
  font-size: 29px;
  margin: 40px 0 20px;
}

#api-doc section h3 {
  padding-top: 10px;
  padding-bottom: 5px;
  font-weight: bold;
  font-size: 18px;
}

#api-doc h4 {
  font-size: 16px;
  font-weight: bold;
}

#api-doc h5 {
  font-size: 14px;
  font-weight: bold;
  color: #666;
}

/* links */

a {
  color: #259dff;
  text-decoration: none;
}

.h2:target {
  display: block;
  padding-top: 40px;
}

#api-doc *:target, #page-doc *:target {
 margin-top: -120px;
 padding-top: 120px;
 z-index: -1;
}

.outlined-img {
  border: 1px solid #eaeaea;
  width: 90%;
}

.current {
  background: #e0f5ff;
}

/* logo */

#logo {
  position: fixed;
  top: 2px;
  margin: 0;
  padding: 10px 25px;
  width: auto;
  border-left: none;
  z-index: 1;
}

#logo .express {
  display: block;
  font: 25px "Helvetica Neue", "Open Sans", sans-serif;
  font-weight: 100;
  color: #444;
}

#description .express {
  display: block;
  font: 4.5em "Helvetica Neue", "Open Sans", sans-serif;
  font-weight: 100;
  margin-bottom: .25em;
}

#description .express a {
  color: #353535;
}

#express-version {
  font-size: 0.2em;
  margin-left: 0.5em;
  color: #259dff !important;
  font-weight: 400;
}

#description {
  margin-bottom: 43px;
  -webkit-font-smoothing: antialiased;
}

#description .description {
  position: relative;
  top: -5px;
  font: 100 4.1em "Helvetica Neue", "Open Sans", sans-serif;
  color: #aeaeae;
  line-height: .87;
}

#description em {
  font-style: normal;
  font-weight: 100;
  font-size: 9px;
  color: #999;
  margin-left: 5px;
}

#conference {
  display: inline;
  float: right;
  margin-left: 10px;
}

#intro {
  margin-left: 5%;
}

#doc-langs {
  text-align: center;
  font-size: 12px;
}

#doc-langs p {
  margin: 3px 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  background: #eee;
  width: 100%;
  height: 57px;
  z-index: 100;
  border-bottom: 1px solid #ddd;
}

.scroll header {
  border-bottom: 1px solid #ddd;
  box-shadow: 0 0 4px #eee;
}

/* companies using express */

img.memberlogo {
  vertical-align: middle;
  width: 240px;
  padding: 10px 20px;
}

/* code */

p code, td code {
  color: #333;
}

pre {
  color: #555;
  font-size: 14px;
  line-height: 1.4;
  padding: 16px;
  border-radius: 3px;
  overflow: auto;
  border: 1px solid #ddd;
}

pre code {
  overflow: scroll;
  word-break: break-all;
}

/* top button */

.scroll #top {
  opacity: .2;
}

#top {
  line-height: 0;
  background: black;
  -webkit-border-radius: 2px;
  position: fixed;
  bottom: 15px;
  right: 15px;
  padding: 8px;
  text-decoration: none;
  color: white;
  opacity: 0;
  -webkit-transition: opacity 300ms;
}

#top:hover {
  opacity: 1;
}

#top img {
  width: 8px;
  height: 5px;
}

/* clearfix */

.clearfix:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.clearfix {
  display: inline-block;
}

html[xmlns] .clearfix {
  display: block;
}

* html .clearfix {
  height: 1%;
}

/* boxes */

#boxes {
  margin-top: 30px;
}

#boxes h3 {
  line-height: 1.25em;
}

#boxes div {
  width: 215px;
  margin-right: 50px;
  float: left;
  list-style: none;
  padding-bottom: 20px;
}

#boxes div:last-child {
  margin-right: 0;
}


#boxes h3 {
  background: none;
  margin-top: 0;
  padding-top: 0;
}

#boxes section p {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 20px;
}

/* applications page */

#applications .section {
  display: block;
  margin-bottom: 50px;
}

.application h2 {
  margin: 0;
}

.application {
  padding: 80px 0;
  height: 600px;
  position: relative;
}

.application p {
  float: left;
  width: 30%;
}

.application img {
  float: right;
}

.application .link {
  position: absolute;
  bottom: 15px;
  left: 15px;
}

.application .link a {
  margin-left: 4px;
}


/* doc specific */

.doctable, section table {
  margin: 1em 1em 1em 0;
  border: 1px solid #c6c6c6;
  border-collapse: collapse;
  empty-cells: show;
  width: 100%;
}

.doctable td, .doctable th, section table td, section table th {
  padding: 7px;
  line-height: 120%;
  vertical-align: top;
  border: 1px solid #c6c6c6;
}

.doctable tr th, section table tr th {
  background-color: #dadada;
  font-size: 110%;
}

.doctable td p:first-child {
  margin-top: 0;
}

.doctable td p, li p {
  width: 100% !important;
}

.doctable ul {
  margin: 20px 0
}

/* doc boxes */

.doc-box {
  font-size: 12px;
  line-height: 14px;
  padding: 10px;
  border-radius: 3px;
  margin: 20px 3% 20px 3%;
}

.doc-box pre {
  font-size: 12px;
  line-height: 14px;
  padding: 0;
  margin: 0;
}

.doc-box p {
  margin: 0 0 8px 0;
}

.doc-box p:last-child {
  margin: 0;
}

.doc-box pre[class*="language-"] {
  background: none repeat scroll 0 0 #fff;
}

/* English pages use backticks for code blocks */
.en-doc .page pre[class*="language-"] {
  padding-top: 10px !important;
}

/* Non-English pages use pre and code tags for code blocks */
.non-en-doc .page pre[class*="language-"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}


.page pre.plain-text, .page code.plain-text {
  padding-top: 0 !important;
  color: #000;
}


.doc-notice {
  background: #faf6e8;
  border: 1px solid #ded8c1;
}

.doc-info {
  background: #f7faec;
  border: 1px solid #dfe2d3;
}

.doc-warn {
  background: #f9f1f1;
  border: 1px solid #e2d3d3;
}

#i18n-notice-box {
  margin-top: 150px;
  position: relative;
}

#close-i18n-notice-box {
  position: absolute;
  top: 3px;
  right: 4px;
  color: #550000;
  cursor: pointer;
}

/* general */

#app-settings-property {
  width: 200px;
}

.button {
  display: block;
  padding: 3px 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  color: #555;
}

#mobile-menu {
  display: none;
  position: relative;
  top: 9px;
  left: 0;
}

#nav-button {
  position: absolute;
  left: 16px;
}

pre, code {
  white-space: pre-wrap !important;
}

#strongloop-header {
  font-size: 0.7em;
  display: block;
  position: absolute;
  right: 2%;
  top: 11px;
  width: 150px;
  border-radius: 3px;
  color: #08592B;
  padding: 3px;
}

footer {
  font-size: 11px;
  margin: 60px 10px 30px 10px;
  padding-left: 5%;
  max-width: 1090px;
}

#footer-content {
  display: table;
  margin: 20px auto 0;
}

#footer-content div {
  float: left;
  margin-right: 20px;
  background-repeat: no-repeat;
  background-position: 0 1px;
  padding-bottom: 4px;
}

#github {
  margin-right: 5px !important;
}

#license {
  text-align: center;
  margin-top: -5px;
}

#license img {
  position: relative;
  top: 3px;
}

#fork {
  background-image: url(/images/fork-icon.png);
  background-size: 11px 16px;
  padding-left: 15px;
}

@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-devicepixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx) {

  #fork {
    background-image: url(/images/fork-icon@2x.png);
  }

  #announcements p:first-child {
    background-image: url(/images/announcement-icon@2x.png);
  }

}

/* navigation */

#navbar {
  padding-left: 5%;
  max-width: 1000px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  top: 15px;
  box-sizing: content-box;
  line-height: 30px;
}

#navbar a {
  color: #666;
  padding-left: 20px;
  -webkit-font-smoothing: subpixel-antialiased;
}

#navbar a.active {
  font-weight: bold;
  color: #353535;
}


/* dropdown menu */

#navmenu {
  padding: 0;
  margin: 0;
  right: 0px;
  z-index: 1000;
  margin-right: 15px;
}

#navmenu > li {
  list-style: none;
  padding: 0;
  float: left;
}

#navmenu a:hover {
  text-decoration: none;
}

.menu ul {
  display: none;
}

.menu ul.dropit-submenu {
  background-color: #fcfcfa;
  border: 1px solid #b2b2b2;
  margin: 0 0 0 1px;
  box-shadow: 0px 1px 3px rgba(0,0,0,0.15);
}

.menu ul.dropit-submenu a {
  display: block;
  color: #777;
  padding: 0 8px 2px 8px;
}

.menu ul.dropit-submenu a:hover {
  background: #259dff;
  color: #fff !important;
  text-decoration: none;
}

/* secondary menu */

#menu,
#tags-side-menu,
#blog-side-menu-container {
  position: fixed;
  margin: 0;
  padding: 0 10px 0 0;
  top: 153px;
  left: 30px;
  height: 500px;
  text-align: left;
  font-size: 13px;
  overflow-y: auto;
}

#blog-side-menu-container {
  max-width: 210px;
}

#blog-side-menu-container li {
  max-width: 100%;
  margin-bottom: 5px;
}

#blog-side-menu {
  list-style: none;
  padding: 0;
}

#menu em,
#tags-side-menu em,
#blog-side-menu em{
  font-weight: bold;
  color: #888;
}

#menu li {
  list-style: none;
}
#tags-side-menu li {
  list-style: none;
  font-size: 15px;
  font-weight: bold;
}

#menu ul,
#tags-side-menu ul {
  height: 0;
  overflow: hidden;
}

#menu ul.active,
#tags-side-menu ul.active {
  height: auto;
  padding: 0;
}

#menu > li > a,
#tags-side-menu > li > a,
#blog-side-menu > li > a {
  font-weight: bold;
  font-size: 13px;
}

#blog-side-menu > li > a {
  color: #666
}

#blog-side-menu-container > h3 > a  {
  color: #353535
}



#menu ul a,
#tags-side-menu ul a {
  color: #555;
  padding-right: 7px;
}
#tags-side-menu ul a{
  font-size: 13px;
  font-weight:initial;
}

#menu ul a.active,
#tags-side-menu ul a.active {
  color: #259dff;
}

h2 a {
  color: #353535 !important;
}

/* search */

#q {
  display: none;
  height: 2.5em;
  max-width: 100%;
  padding: 5px;
}

.algolia-autocomplete {
  max-width: 9em;
  top: -0.2em;
  margin-right: 3px;
}

.algolia-autocomplete #q {
  display: initial
}
/* search-bar desktop re-sizing */
@media all and (min-width: 950px) {
  .algolia-autocomplete {
    margin-right:15px;
    max-width: 12em;
  }
}

/* responsive */

@media all and (max-width: 899px) {

  #conference a img {
    width: 150px;
    margin-right: 10px;
  }

  #home-content {
    flex-direction: column;
  }

  #install-command {
    display: none;
  }

  #home-content .pane {
    min-width: auto;
    font-size: 74%;
  }

  #homepage-leftpane {
    padding-top: 0px;
  }

  #homepage-rightpane {
    padding-top: 0;
    padding-right: 0;
  }

  .table-scroller {
    width: 100%;
    overflow: scroll;
  }

  #api-doc section {
    padding-left: 0;
  }

  code {
    word-break: break-all;
  }

  .menu ul.dropit-submenu a {
    font-size: 16px !important;
  }

  ul {
    padding-left: 5%;
  }

  h1 {
    font-size: 22px;
    line-height: 26px;
  }

  h2 {
    font-size: 18px;
    line-height: 25px;
  }

  h3 {
    font-size: 16px;
    line-height: 23px;
    word-break: break-all;
  }

  h4 {
    font-size: 16px;
    line-height: 18px;
    font-weight: normal;
  }

  #menu,
  #tags-side-menu,
  #blog-side-menu-container {
    display: none;
  }

  .content {
    padding-left: 0;
  }

  #home-content {
    margin: 150px 0 0 5%;
    padding-right: 5%;
  }

  #description {
    margin-bottom: 35px;
  }

  #description .express {
    display: none;
  }

  #description .description {
    font-size: 3em;
    line-height: .9em;
    font-weight: 200;
  }

  #install-command {
    width: 100%;
    margin-right: 5%;
  }

  #logo {
    position: static;
    width: 100%;
  }

  #logo a {
    display: table !important;
    margin: 0 auto;
  }

  #logo .express {
    margin-top: 0px;
    font-weight: bold;
  }

  .github-fork-ribbon-wrapper {
    display: none;
  }

  #mobile-menu {
    display: block;
  }

  #boxes div {
    width: 90%;
  }

  #home-menu {
    display: block;
    position: absolute;
    top: 7px;
  }

  #navbar {
    padding: 0;
    top: 1px;
  }

  #navbar a {
    font-size: 19px;
    margin: 0;
    padding-left: 5%;
  }

  #navmenu {
    left: 0;
    padding: 0;
    top: 2px;
    background: #fff;
    width: 100%;
    display: none;
  }

  #navmenu.opens {
    display: block;
  }

  #overlay.blurs{
    display: block;
  }

  #navmenu > li {
    float: none;
    border-bottom: 1px solid #ccc;
    margin: 0;
    min-height: 47px;
    position: relative;
    background: #eee;
    cursor: pointer;
  }

  #navmenu > li:first-child {
    display: none;
  }

  #navmenu > li:hover {
    background: #e9e9e9;
  }

  #navmenu > li > ul {
    position: static;
  }

  .dropit .dropit-submenu {
    position: static !important;
  }

  .dropit .dropit-trigger {
    padding-top: 7px;
  }

  .menu ul.dropit-submenu {
    margin-top: 7px;
    background: #ddd;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 190px;
    overflow-y: scroll;
    overflow-x: hidden;
  }

  .dropit-trigger > a {
    display: block;
    margin-bottom: 8px !important;
  }

  .menu ul.dropit-submenu a {
    padding: 5px 5px 5px 5%;
  }

  .dropit-submenu li {
    border-bottom: 1px solid #cdcdcd;
  }

  .dropit-submenu a {
    padding-left: 10% !important;
  }

  .menu ul {
    display: block;
  }

  .active-mobile-menu {
    border-bottom: none !important;
  }

  .active-mobile-menu .dropit-trigger {
    margin-bottom: 0 !important;
  }

  .menu ul.dropit-submenu a:hover {
    background: #cccccc;
    color: #666 !important;
  }

  footer {
    margin: 60px 0px 30px 0px;
    padding: 0 5%;
  }

  #footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  #footer-content div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    white-space: nowrap;
  }

  #footer-content div#sponsor {
    display: block;
  }

  #doc-langs {
    font-size: 11px;
  }

  .algolia-autocomplete {
    display: none !important;
  }

}


@media all and (max-width: 420px) {

  #conference {
    display:none;
  }

  #app-settings-property {
    width: auto;
  }

  #strongloop-header {
    display: none;
  }

  #description .express {
    display: none;
  }

  footer {
    margin-top: 14px;
  }

  #footer-content {
    margin-left: 5%;
  }

  #footer-content div {
    clear: both;
  }

  #footer-content div:nth-child(4) {
    white-space: pre-line;
    text-align: center;
  }

  #fork {
    margin-left: 7px;
    margin-top: 2px;
    margin-bottom: 30px;
    padding-left: 18px;
  }

}

@media all and (max-width: 320px) {

  #install-command {
    font-size: 12px;
  }
}

@media print {

  header {
    position: absolute;
  }

  #mobile-menu {
    display:none;
  }
}

/* For image callouts in writing-middleware.md  */

.callout {position: relative;}

#mw-fig { border-collapse: separate; padding: 0; border: 0; width: 960px; margin-bottom: 20px;}
#mw-fig-imgcell {margin: 0; padding: 0px; border: 0; width: 410px;}
#mw-fig-img {margin: 0px; padding: 0px; width: 410px; height: 308px;}
.mw-fig-callouts {margin: 0; padding: 0 0 0 5px; border: 0; width: 550px;}

/* For middleware pages */

/*
#mw-list {
  float: left;
  width: 180px;
  margin: 0;
  padding: 0 10px 0 10px;
  font-size: 13px;
 }

#middleware {
  min-width: 300px;
}
*/

#mw-container {
  display: flex;
  display: -webkit-flex; /* Safari */
  width: 100%;
}

#mw-list {
  min-width: 180px;
  margin: 0;
  padding: 0 10px 0 10px;
  font-size: 13px;
  overflow-y: auto;
 }

#middleware-content {
  /* flex: 0.85; */
  margin-left: 10px;
}

#mw-list ul li {
 margin-left: -20px;
}
/* Blog page styles*/
#blog-doc {
  margin: 0 10px;
}
#blog-doc:has(> h1#express-blog), 
#blog-doc:has(> h1#write-a-blog-post) {
  min-height: 300px;
}
#blog-doc .blog-details ~ p > img {
  width: 200px;
  float: right;
}
#blog-doc p {
  font-size: 1.1em;
}
.blog-posts {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}
.blog-post {
  width: 100%;
  background-color: #eee;
  display: flex;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 2px 3px #E0E0E0;
  border-radius: 5px;
  border: 1px solid #808080;  
  transition: 0.1s;
}
.blog-post:hover {
  background-color: #D3D3D3;
  border: 1px solid #303030;
}
.blog-post img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.blog-post .blog-details {
  display: flex;
  flex-direction: column;
}
.blog-details div:first-child {
  margin-bottom: 5px;
}
.blog-tag {
  font-size: 12px;
}
.blog-title {
  font-size: 1.3rem;
  line-height: 1.5rem;
  font-weight: 500;
  padding-right: .2em;
}
.blog-title a {
  color: #000;
}
.blog-excerpt {
  color: initial;
  font-size: .75rem;
}
.blog-img {
  max-width: 100%;
  margin: auto;
}
.blog-author {
  font-style: italic;
}
.blog-date {
  font-weight: bold;
  font-size: 85%;
}
/* mobile-only */
@media (max-width: 500px) {
  #blog-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding-right: 10px;
  }
  #blog-doc .blog-details + p {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #blog-doc .blog-details + p > img {
    margin-bottom: 15px;
  }
}
/* blog tablet and up*/
@media (min-width: 768px) {
  .blog-post {
    margin: auto;
  }
  .blog-tags {
    margin-bottom: 20px;
  } 
  .blog-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    line-height: 1.5rem;
  }
  .blog-post .blog-details {
    display: flex;
    flex-direction: row;
    margin-left: 1rem; 
    font-size: 90%;
  }
  .blog-post .blog-details div:first-child {
    margin-right: 20px;
  }
  .blog-details  {
    font-size: 1rem;
  }
  .blog-excerpt {
    line-height: initial;
    font-size: .85rem;
    font-weight: 300;
    margin-top: auto;
    margin-bottom: 10px;
    max-width: 80%;
  }
}
