/*
 Copyright (c) 2016 StrongLoop, IBM, and Express Contributors
 License: MIT
*/

/* general */

:root {
  --box-fg: rgb(24, 24, 24);
  --info-bg: rgb(207, 212, 252);
  --info-accent: rgb(15, 28, 138);
  --notice-bg: rgb(252, 234, 197);
  --notice-accent: rgb(115, 82, 13);
  --warn-bg: rgb(250, 209, 223);
  --warn-accent: rgb(138, 15, 58);
  --code-bg: #f0f1f3;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
  font: 400 14px/1.6 "Open Sans", sans-serif;
  background: #fff;
  margin: 0;
  padding: 0;
  color: #555;
}

body.no-scroll{
  overflow: hidden;
}

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

main.home {
  max-width: 75rem;
  margin: 40px auto 2%;
  padding-inline: 5%;
}

#home-content {
  display: flex;
}

.en-doc #home-content {
  margin-top: 150px;
}

#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-top: 40px;
  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;
}

/* scroll */

*::-webkit-scrollbar {
  background-color: hsla(0, 0%, 100%, .145);
  width: 16px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 8px;
  border: 4px solid transparent;
  background-clip: content-box;
  background-color: hsl(0, 0%, 67%);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: gray;
}

*::-webkit-scrollbar-thumb:active {
  background-color: #616161;
}

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

.current {
  background: #e0f5ff;
}

/* logo */

#logo {
  width: auto;
  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: #7e7e7e;
  line-height: .87;
}

#description em {
  font-style: normal;
  font-weight: 100;
  font-size: 9px;
  color: #999;
  margin-left: 5px;
}

#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;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 45px;
  z-index: 100;
  border-bottom: 1px solid #ddd;
}

.scroll header {
  border-bottom: 1px solid #ddd;
  box-shadow: 0 0 4px #eee;
}

/* 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 {
  padding: 0;
  overflow: scroll;
  word-break: break-all;
  background-color: inherit;
}

code {
  background-color: var(--code-bg);
  margin-block: -.125rem;
  font-size: 13px;
  padding: .125rem .375rem;
  line-height: 28px;
  border-radius: 6px;
}

/* top button */

.scroll #top {
  opacity: .2;
}

#top {
  line-height: 0;
  background: black;
  border-radius: 2px;
  position: fixed;
  bottom: 15px;
  right: 15px;
  padding: 8px;
  text-decoration: none;
  color: white;
  opacity: 0;
  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 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 20px;
  column-gap: 50px;
  margin-top: 30px;
}

#boxes h3 {
  line-height: 1.25em;
}

#boxes div {
  list-style: none;
  text-align: center;
}

#boxes h3 {
  background: none;
  margin-top: 0;
  padding-top: 0;
}

#boxes section p {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 20px;
}

/* 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 {
  padding: 16px;
  color: var(--box-fg);
  border-radius: 0 6px 6px 0;
  margin-top: 1rem;
}

.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: var(--notice-bg);
  border-left: 3px solid var(--notice-accent);
}

.doc-notice a{
  color: var(--notice-accent);
  text-decoration: underline;
}

.doc-info {
  background: var(--info-bg);
  border-left: 3px solid var(--info-accent);
}

.doc-info a{
  color: var(--info-accent);
  text-decoration: underline;
}

.doc-info-title {
  color: var(--info-accent);
  font-weight: 600;
}

.doc-warn {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-accent);
}

.doc-warn-title {
  color: var(--warn-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-warn a {
  color: var(--warn-accent);
  text-decoration: underline;
}

#i18n-notice-box {
  margin: 100px 3% 20px 3%;
  position: relative;
}

#close-i18n-notice-box {
  position: absolute;
  top: 3px;
  right: 4px;
  color: var(--notice-accent);
  cursor: pointer;
}

/* general */

#app-settings-property {
  width: 200px;
}

.button {
  display: block;
  padding: 3px 5px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--box-fg);
}

#mobile-menu {
  display: none;
  position: relative;
}

pre, code {
  white-space: pre-wrap !important;
}

footer {
  font-size: 12px;
  margin: 60px 5% 30px;
  display: flex;
  gap: 24px;
  flex-direction: column;
}

#footer-content {
  width: 100%;
  justify-content: space-between;
  gap: 32px;
  display: flex;
}

#footer-copyright {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

#footer-copyright a {
  width: fit-content;
}

#footer-copyright img {
  max-width: 125px;
}

#footer-policy{
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 8px;
  justify-content: center;
  font-size: 15px;
}

#footer-links{
  display: flex;
  gap: 20px;
}

.footer-social {
  display: flex;
  gap: 20px;
  font-size: 20px;
}

@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) {
  #announcements p:first-child {
    background-image: url(/images/announcement-icon@2x.png);
  }

}

/* navigation */

#navbar {
  line-height: 30px;
  display: flex;
  align-items: center;
}

#navbar a {
  color: #666;
}

#navbar a.active {
  font-weight: bold;
  color: #353535;
}

#navbar ul {
  list-style: none;
}

#navmenu {
  display: flex;
  gap: 20px;
}


/* dropdown menu */

.submenu {
  position: relative;
  list-style: none;
}

.submenu-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%);
  margin: auto;
  box-shadow: 0px 1px 3px #00000026;
  z-index: 1000;
  min-width: 230px;
  width: fit-content;
  background-color: #fcfcfa;
  border: 1px solid #b2b2b2;
  border-radius: 12px;
  list-style: none;
  padding: 0;
  display: none;
}

.submenu-content li:first-child a {
  border-radius: 12px 12px 0 0;
}

.submenu-content li:last-child a {
  border-radius: 0px 0px 12px 12px;
}

.submenu.open .submenu-content {
  display: initial;
}

#navmenu {
  padding: 0;
  margin: 0;
  right: 0px;
  z-index: 1000;
  margin-right: 15px;
}

.submenu-content li a {
  display: block;
  color: #777;
  padding: 2px 20px 2px 20px;
}

#navbar .submenu-content a:hover {
  background: #259dff;
  color: #fff;
  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;
}

.algolia-autocomplete #q {
  display: initial;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: color .3s ease;
  padding-inline: 12px;
  outline: none;
}

.algolia-autocomplete #q:focus-visible,
.algolia-autocomplete #q:focus {
  border-color: #333;
}

/* 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: 1110px) {
  #boxes {
    grid-template-columns: 1fr 1fr;
  }

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

  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: 60px 0 0 5%;
    padding-right: 5%;
    text-align: center;
  }

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

  #home-menu {
    display: block;
    position: absolute;
    top: 7px;
  }

  #overlay.blurs{
    display: block;
  }

  .menu ul {
    display: block;
  }

  #footer-content {
    flex-wrap: wrap;
    justify-content: center;
  }

  #footer-copyright > a {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  #doc-langs {
    font-size: 11px;
  }
}


@media all and (max-width: 540px) {
  #boxes {
    grid-template-columns: 1fr;
  }
}

@media all and (max-width: 420px) {
  #app-settings-property {
    width: auto;
  }

  #description .express {
    display: none;
  }
}

@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-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-wrap: wrap;
    flex-direction: column;
    align-items: center;
    margin-right: 0;
    padding-right: 10px;
  }



  #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%;
  }
}

.no-release {
  color: gray;
  opacity: 0.8;
}
html.dark-mode .no-release {
  color: #abc8c3;
}

.supported {
  color: green !important;
}
.eol {
  color: red !important;
}

.logo-table {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 48px;
}

.logo-table h3{
  margin-bottom: 12px;
}

.hidden-dark {
  display: block;
}

html.dark-mode .hidden-light {
  display: block;
}
html.dark-mode .hidden-dark {
  display: none;
}

blockquote {
  margin-left: 0;
  font-weight: 600;
  font-style: italic;
  padding-left: 1.2em;
  border-left: .25rem solid #ccc;
}

@media all and (max-width: 1110px) {
  header {
    column-gap: 12px;
    padding-inline: 32px;
  }

  #mobile-menu {
    display: block;
  }

  .algolia-autocomplete {
    display: none !important;
  }

  #navbar {
    padding: 0;
    top: 1px;
    position: static;
  }

  #navmenu>li:first-child {
    display: none;
  }

  #navmenu>li {
    border-bottom: 1px solid #ccc;
    margin: 0;
    min-height: 47px;
    background: #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
  }

  #navmenu>li:hover {
    background: #e9e9e9;
  }

  #navmenu {
    left: 0;
    padding: 0;
    top: 57px;
    background: #fff;
    width: 100%;
    position: absolute;
    display: none;
  }

  #navmenu.opens {
    display: block;
  }

  #navbar a {
    font-size: 19px;
    margin: 0;
    width: 100%;
    height: 100%;
    padding-left: 5%;
  }

  #navbar .submenu.open {
    flex-direction: column;
    align-items: initial;
  }

  .submenu.open > a {
    display: flex;
    align-items: center;
    min-height: 47px;
  }

  .submenu-content {
    width: 100%;
    position: static;
    display: none;
    margin-top: 7px;
    background: #ddd;
    color: #333;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 190px;
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
  }

  .submenu-content li > a {
    width: 100%;
  }

  .submenu-content li:first-child a {
    border-radius: 0;
  }

  .submenu-content li:last-child {
    border-bottom: 0;
  }

  .submenu-content li:last-child a {
    border-radius: 0;
  }

  .submenu-content.open {
    display: inline-block;
  }

  #navbar .submenu-content li a {
    font-size: 16px;
    padding: 5px 5px 5px 5%;
    padding-left: 10%;
  }

  .submenu-content li {
    border-bottom: 1px solid #cdcdcd;
  }

  .submenu-content li a:hover {
    background: #cccccc;
    color: #666;
  }

  #theme-icon-container{
    z-index: 10000;
  }
}