$roboto-font-path: "/theme/font/roboto/";

@import "components/color";

$primary-color: color("light-blue", "base");
$primary-color-light: lighten($primary-color, 15%);
$primary-color-dark: darken($primary-color, 15%);

$secondary-color: color("teal", "lighten-1");
$success-color: color("green", "base");
$error-color: color("red", "base");
$link-color: color("light-blue", "darken-1");

/*$small-screen: 650px;
$small-screen-up: 651px;*/

@import "materialize.scss";

/* overall page look */
$p-max-width: 700px;
#content, .container.nav-wrapper {
    width: 86%;
}
html {
  font-size: 16px;
}
p:has(img) {
  display: inline;
  max-width: unset;
}

/* Article list style */
.article {
  overflow: hidden;
  text-align:justify;
  margin: 10px 0;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  h5 {
    font-size: 1.3rem;
    margin: 0 10px;
  }
  .head-title {
    margin: 10px 0;
  }
}

.leadimage {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

/* footer always at bottom */
footer.page-footer {
  width: 100%;
	padding-top: 0px;
	position: absolute;
	bottom: 0px;
	height: 85px;
	line-height: 35px;
	padding: 5px 0 10px 0;
	color: white;
}
#all {
  background-color: #fafafa;
  position:relative;
  overflow-y: hidden;
  min-height: 100vh;
}
#content, #search {
  padding-bottom: 20px;
  padding-top: 104px;
  margin: 0 auto;
}
html, body {
  min-height: 100vh;
}

/* side links */
.sidelink {
  height:100%;
  width: 45px;
  top:0px;
  position:absolute;
}
.sidelink svg {
  fill: #03A9F4;
}
.sidelink div:hover svg {
  fill: #fff;
}

.sidelink-l svg {
  position: fixed; top: 50%; left: 10px;
}
.sidelink-r svg {
  position: fixed; top: 50%; right: 10px;
}
@media #{$medium-only} {
  .sidelink {
    height:100%;
    width: 25px;
    top:0px;
    position:absolute;
  }
  .sidelink-r svg {
    right:0px;
  }
  .sidelink-l svg {
    left:0px;
  }
}
.sidelink div {
  width: 100%;
  height: 100%;
}
.sidelink div:hover {
  background-color: $primary-color-light;
}

/* top navigation */
@media #{$medium-only} {
  nav .brand-logo {
    left: unset;
    transform: unset;
  }
}

nav {
  background-color: $primary-color;
  line-height: 64px;
}
@media #{$medium-and-down} {
  nav {
    line-height: 56px;
  }
}

nav.subnav {
  background-color: $primary-color-light;
  margin-top: -16px;
  transition: 0.3s;
  height: 40px;
  position: absolute;
}
.show-subnav1 nav.subnav1, .show-subnav2 nav.subnav2 {
  transition: 0.3s;
  margin-top: 64px;
  z-index: 4;
}
nav.subnav li {
  height: 40px;
  line-height: 40px;
}


.toplinks > a, .menu-icon {
  display: block;
  padding: 0 15px;
  height: 64px;
  line-height: 64px;
  cursor: pointer;
}
.toplinks > a:hover, .menu-icon:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
.toplinks {
  z-index: 3;
  position: absolute;
  right: 0;
}

.search-icon svg, .menu-icon svg {
  height: 64px;
  width: 30px;
}
.search-icon, .menu-icon {
  height: 64px;
}
@media #{$small-and-down} {
  .search-icon svg, .menu-icon svg {
    height: 56px;
  }
  .toplinks > a, .search-icon, .menu-icon {
    height: 56px;
  }
}

.hide-on-small-and-up {
  display: none;
}
@media only screen and (max-width: 330px) {
  .hide-on-ultra-small {
    display: none;
  }
  .hide-on-small-and-up {
    display: block;
  }
}

/* Bottom nav */
.pagination li {
  padding: 0px;
}
.pagination li a {
  padding: 0px 10px;
}

/* Side nav */

.side-nav a.collapsible-header {
  margin: 0;
}

/* Article */
.type-article {
  p {
    padding: 0rem 1rem 0rem 0rem;
    text-align: justify;
    display: block;
    max-width: $p-max-width;
    margin: 0 auto;
  }
  table {
    max-width: $p-max-width;
    padding: .5rem 0rem;
    margin: 0 auto;
  }

  h2#title {
    margin: 0px;
  }

  .metadata {
    margin-bottom: 1rem;
    text-align: center;
  }

  article {
    text-align: center;
  }
  th {
    padding: 5px 5px 0px 5px;
    font-weight: unset;
  }
  td {
    padding: 5px;
  }
  .author {
    margin: .5rem 0;
  }
  .section {
    padding: 0 1rem;
    background-color:white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    .has-image {
      text-align: center;
    }
    img {
      max-width: 100%;
    }
    ul, ol {
      text-align: left;
      padding: 0 .5rem;
      max-width: $p-max-width;
      margin: 0px auto;
    }
    h3, h4, h5, h6 {
      max-width: $p-max-width;
      margin: 1rem auto .5rem auto;
      text-align: left;
    }
    h3 {
      font-size: 2rem;
      padding-bottom: 3px;
      border-bottom: solid #d0d0d0 1px ;
    }
    h4 {
      font-size: 1.6rem;
    }
    h5 {
      font-size: 1.1rem;
    }
    h6 {
      font-size: 1rem;
    }
  }

  pre {
    padding: 2px 0 2px 10px;
    background-color: #2b2b2b;
    display:inline-block;
    text-align: left;
    min-width: $p-max-width - 4px;
    max-width:100%;
  }
  code {
    padding: 2px 5px;
    color: #bababa;
    background-color: #2b2b2b;
    font-family: "Menlo", "Liberation Mono", "Consolas", "DejaVu Sans Mono", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace;
  }
  pre code {
    padding: 0;
  }
  article ul li {list-style: circle inside}
  article ol li {list-style-position: inside}

  @media #{$small-and-down} {
    #content {
      width: 100%;
    }
  }
  @media only screen and (max-width: ($p-max-width/.85)) {
    pre {
      min-width: 100%;
    }
  }
}

@import "search.scss"