@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

:root {
  --text-max-width: 700px;
  --page-max-width: 1366px;
  --wide-max-width: 900px; /* for wider items such as wide images or code or embeds */
}

html {
  font-family: Lato, Helvetica, Arial, sans-serif; /* match Canvas LMS Fonts */
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}
h1 {
  font-size: 1.8em;
}

h2 {
  font-size: 1.6em;
}

h3 {
  font-size: 1.3em;
}

h4 {
  font-size: 1.125em;
}

h5 {
  font-size: 15px;
}

h6 {
  font-size: 12px;
}

.container-fluid {
  max-width: var(--page-max-width);
  min-width: 301px;
}

.main-content > h1,
.main-content > h2,
.main-content > h3,
.main-content > h4,
.main-content > h5,
.main-content > h6,
.main-content > p,
.main-content > ul,
.main-content > ol,
.main-content > dl,
.main-content > dd,
#pageTitleH1,
#breadcrumbs,
a.summary-link,
.footnotes,
#text,
#topTOC,
form,
.missingPage {
  max-width: var(--text-max-width);
  margin-right: auto;
  margin-left: auto;
}
/* for resistor LED constant current calculator results */
.resultBox {
  border: lightgray solid 1px;
  border-radius: 5%;
  width: 50px;
  display: inline-block;
  text-align: center;
}
.responsive-table-markdown {
  overflow-x: auto;
  margin: 0 auto;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.responsive-table-markdown > table {
  width: 100%;
  border-collapse: collapse;
}
.responsive-table-markdown > table tr:nth-child(even) {
  background-color: #f2f2f2; /* make zebra stripes */
}
/* table inner borders */
.responsive-table-markdown > table td + td {
  border-left: 1px solid #ccc;
}
.responsive-table-markdown > table tr + tr td {
  border-top: 1px solid #ccc;
}
.responsive-table-markdown > table td,
.responsive-table-markdown > table th {
  padding: 1rem;
}
.responsive-table-markdown > table th {
  font-size: 1.125em;
}

img {
  width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

.two-column-instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 0;
  justify-items: center;
  margin: 0 auto;
  padding: 0;
  border-right: 1px solid #5b5b5b;
  border-bottom: 1px solid #5b5b5b;
}

.two-column-instructions-grid > * {
  border-top: 1px solid #5b5b5b;
  border-left: 1px solid #5b5b5b;
  width: 100%;
  padding: 1rem;
  margin-bottom: 0;
}

.two-column-instructions-grid > ul {
  padding-left: 2rem;
}

.two-column-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  grid-gap: 0px;
  padding-bottom: 1rem;
}

.text-card {
  align-self: start;
}

.tutorial-video-grid,
.video-grid {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding-bottom: 2rem;
  margin: 0 auto;
}

/* youtube tutorial video iframes */
.iframe-16-9-container {
  position: relative;
  width: 100%;
  height: 0px;
  padding-top: 56.25%;
}

/* tinker-cad iframes */
.iframe-tinkercad-container {
  position: relative;
  width: 100%;
  height: 0px;
  padding-top: 62.48275862068966%;
  margin: 0 auto;
  max-width: var(--wide-max-width);
}

.youTubeIframe,
.vimeoIframe,
.responsiveIframe {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* width: 100%;
  max-width: 400px;
  */
  justify-content: space-between;
}

/* summary on Hugo list pages */
a.summary-link {
  color: #000;
  text-decoration: none;
}

/* Title on Hugo list pages */
a.title-link {
  text-decoration: none;
}
/* from files */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
}

.image-card {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.fit-img {
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.image-box {
  position: relative;
  width: 300px;
  height: 300px;
}

/* site title on pages below nav menu */
#pageTitleH1,
#breadcrumbs {
  padding: 0.5rem 0 0 0;
}

#TableOfContents > ul {
  list-style: none;
}

.toc-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #5b5b5b;
}

#topTOC {
  padding-bottom: 1rem;
  border-bottom: 1px solid #ccc;
  margin-bottom: 1rem;
}

#top-prev-next,
#bottom-prev-next,
.footer-links {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1rem;
  padding: 1rem 0 1rem 0;
  max-width: var(--text-max-width);
  margin: 0 auto;
}

.footer-links {
  padding-top: 4rem;
}

.footer-item {
  text-align: center;
}

/* For over text width size */

@media only screen and (min-width: 700px) {
  .responsive-table-markdown > table {
    width: initial; /* reset from mobile width: 100% */
    max-width: var(--page-max-width);
    min-width: var(--text-max-width);
    margin: 0 auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .two-column-instructions-grid {
    max-width: var(--page-max-width);
  }
}
/* For desktop and larger screens */
@media only screen and (min-width: 1000px) {
  .two-column-grid {
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
  }

  .two-column-grid > p {
    margin-bottom: 0; /* to keep youTube videos and images vertically aligned since hugo wraps the images in p tags */
  }

  #top-prev-next,
  #bottom-prev-next {
    grid-template-columns: 1fr 1fr;
    grid-gap: 6rem;
    padding: 2rem 0 2rem 0;
  }
}

/* Code Blocks */

/* used in code blocks to indent and have space at bottom for readability */
pre {
  padding-left: 1rem;
  padding-bottom: 1rem;
}

.highlight-wrapper {
  max-width: var(--wide-max-width);
  margin: 0 auto;
  overflow-x: scroll;
  display: block;
}

.highlight {
  position: relative;
  z-index: 0;
  padding: 0;
  margin: 0;
  border-radius: 4px;
}

.highlight > .chroma {
  color: #d0d0d0;
  background-color: #212121;
  position: static;
  z-index: 1;
  border-radius: 4px;
  padding: 10px;
}

.chroma {
  overflow: auto;
}

.chroma .lntable {
  display: table;
  width: 100%;
  padding: 0 0 5px;
  margin: 0;
  border-spacing: 0;
  border: 0;
  overflow: auto;
}

.chroma .lntd:first-child {
  padding: 7px 7px 7px 10px;
  margin: 0;
}

.chroma .lntd:last-child {
  padding: 7px 10px 7px 7px;
  margin: 0;
}

.copyable-text-area {
  position: absolute;
  height: 0;
  z-index: -1;
  opacity: 0.01;
}

.copy-code-button {
  color: #272822;
  background-color: #fff;
  border-color: #272822;
  border: 2px solid;
  border-radius: 3px 3px 0px 0px;
  min-width: 6rem;
  /* right-align */
  display: block;
  margin-left: auto;
  margin-right: 0;

  margin-bottom: -2px;
  padding: 3px 8px;
  font-size: 0.8em;
}

.copy-code-button:hover {
  cursor: pointer;
  background-color: #f2f2f2;
}

.copy-code-button:focus {
  /* Avoid an ugly focus outline on click in Chrome,
     but darken the button for accessibility.
     See https://stackoverflow.com/a/25298082/1481479 */
  background-color: #e6e6e6;
  outline: 0;
}

.copy-code-button:active {
  background-color: #d9d9d9;
}

.highlight pre {
  /* Avoid pushing up the copy buttons. */
  margin: 0;
}
