---
---

// custom palette
// https://material.io/resources/color
// https://www.materialpalette.com/colors
// using GREY, BLUE, and LIGHT GREEN palettes

$color-primary: #424242;
$color-primary-dark: #212121;
$color-primary-light: #e0e0e0;
$color-primary-hover: #bdbdbd;
$code-comment-color: #33691e;

// Headers
$header-heading-color: $color-primary-light !default;
$header-bg-color: $color-primary !default;
$header-bg-color-secondary: $color-primary-dark !default;

// Text
$section-headings-color: $header-bg-color-secondary !default;
$body-text-color: $color-primary !default;
$body-link-color: #1565c0 !default;
$body-link-hover-color: #1e88e5 !default; // custom
$blockquote-text-color: $color-primary-dark !default;

// Code
$code-bg-color: #f8f8f8 !default;
$code-text-color: $color-primary-dark !default;

// Borders
$border-color: #dce6f0 !default;
$table-border-color: #e9ebec !default;
$hr-border-color: #eff0f1 !default;

// Breakpoints
$large-breakpoint: 1024px;
$medium-breakpoint: 768px;
$mobile-breakpoint: 480px;

// @include large: > large breakpoint
@mixin large {
  @media screen and (min-width: #{$large-breakpoint}) {
    @content;
  }
}

// @include medium: between large and medium breakpoint
@mixin medium {
  @media screen and (min-width: #{$medium-breakpoint}) and (max-width: #{$large-breakpoint}) {
    @content;
  }
}

// @include small: between medium and mobile breakpoint
@mixin small {
  @media screen and (min-width: #{$mobile-breakpoint}) and (max-width: #{$medium-breakpoint}) {
    @content;
  }
}

// @include mobile: < mobile breakpoint
@mixin mobile {
  @media screen and (max-width: #{$mobile-breakpoint}) {
    @content;
  }
}

// IMPORTS
@import "normalize.css";
@import "rouge-github.css";



// BASE
body {
  color: $body-text-color;
}

// links
a {
  text-decoration: none;
  color: $body-link-color;

  &:hover {
    text-decoration: underline;
    color: $body-link-hover-color;
  }
}

// MAIN CONTENT CONTAINER
.main-content {

  kbd {
    background-color: #fafbfc;
    border: 1px solid #c6cbd1;
    border-bottom-color: #959da5;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 #959da5;
    color: #444d56;
    display: inline-block;
    font-size: 11px;
    line-height: 10px;
    padding: 3px 5px;
    vertical-align: middle;
  }

  img {
    max-width: 100%;
  }

  // emoji
  img.emoji {
    height: 1em;
    width: 1em;
    padding: 0;
    margin: 0;

    position: relative;
    top: 0.13em;
  }

  // TYPOGRAPHY

  // base fonts
  color: $body-text-color;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: $section-headings-color;
  }

  code {
    padding: 2px 4px;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9rem;
    color: $code-text-color;
    background-color: $code-bg-color;
    border-radius: 0.3rem;

    // baseline font color
    color: $code-text-color;
    font-size: 1rem;

    // comments
    .c,
    .c1,
    .cm,
    .go {
      color: $code-comment-color;
    }

    // normal text and objects/types
    // and namespaces
    .n,
    .nb,
    .nn,
    .gp {
      color: $code-text-color;
    }

    // parentheses and brackets
    .p {
      color: #616161;
    }

    // base declarations (using, public, etc)
    .k {
      font-weight: normal;
      color: $body-link-color;
    }

    // base types (int, decimal, etc)
    .kt {
      font-weight: normal;
      color: $body-link-color;
    }

    // normal commandline
    .nv,
    .nx {
      color: $code-text-color;
    }

    // normal functions/classes
    .nc,
    .nf {
      font-weight: normal;
      color: #b71c1c;
    }

    // string and constant values
    .bp,
    .s,
    .m,
    .mf,
    .mi {
      color: #d32f2f;
    }
  }

  pre {
    padding: 0.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font: 1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;
    color: $code-text-color;
    word-wrap: normal;
    background-color: $code-bg-color;
    border: solid 1px $border-color;
    border-radius: 0.3rem;

    >code {
      padding: 0;
      margin: 0;
      font-size: 0.9rem;
      color: $code-text-color;
      word-break: normal;
      white-space: pre;
      background: transparent;
      border: 0;
    }
  }

  // paragraphs and list items
  p,
  li {

    // inline code
    code {
      font-size: 1em;
    }
  }

  // code blocks
  .highlight {
    color: $code-text-color;
    background-color: $code-bg-color;
    margin-bottom: 1rem;

    pre {
      margin-bottom: 0;
      word-break: normal;
    }
  }

  .highlighter-rouge {
    background-color: $code-bg-color;
  }

  .highlight pre,
  pre {
    padding: 0.8rem;
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.45;
    border-radius: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  pre code,
  pre tt {
    display: inline;
    max-width: initial;
    padding: 0;
    margin: 0;
    overflow: initial;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;

    &:before,
    &:after {
      content: normal;
    }
  }

  // CUSTOM FOR PYTHON SITE
  span.indicator-syntax {
    font-size: 1.25rem;
  }

  span.qna-dataframe {
    font-size: 0.8rem;
  }
  // END CUSTOM

  pre {
    color: $code-text-color;
    background-color: $code-bg-color;

    code {
      color: $code-text-color;
    }
  }

  // quote blocks
  blockquote {
    padding: 1rem 0.5rem 1rem 1rem;
    margin-left: 0;
    margin-inline-end: auto;

    border-left: 0.3rem solid $border-color;
    background-color: $code-bg-color;

    font-family: "Google Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: $blockquote-text-color;
    font-size: 1rem;

    code {
      font-size: 1em;
    }

    > :first-child {
      margin-top: 0;
    }

    > :last-child {
      margin-bottom: 0;
    }
  }

  // tables
  table {
    display: block;
    width: 100%;
    overflow: auto;
    word-break: normal;
    word-break: keep-all; // For Firefox to horizontally scroll wider tables.
    -webkit-overflow-scrolling: touch;

    th,
    td {
      padding: 0.5rem 1rem;
      border: 1px solid $table-border-color;
      font-size: 1rem;

      code {
        font-size: 1em;
      }
    }

    th {
      font-weight: 700;
    }

    td {
      vertical-align: top;
    }
  }

  dl {
    padding: 0;

    dt {
      padding: 0;
      margin-top: 1rem;
      font-size: 1rem;
      font-weight: bold;
    }

    dd {
      padding: 0;
      margin-bottom: 1rem;
    }
  }

  hr {
    height: 2px;
    padding: 0;
    margin: 1rem 0;
    background-color: $hr-border-color;
    border: 0;
  }
}

// CYCLOTRON (prev/next indicator nav)
.cyclotron {
  font-size: 2.4rem;
  font-weight: bold;
  line-height: 0.8;
  float: right;

  a {
    &:hover {
      text-decoration: none;
    }
  }

  // .prev { }
  .next {
    padding-left: 1rem;
  }
}

// CONTRIBUTORS

.d-inline-block {
  display: inline-block !important;
}

.list-style-none {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;

  li {
    &::before {
      display: none !important;
    }
  }
}

.circle {
  border-radius: 50%;
}


// FOOTER / EDIT PAGE
.footer {
  margin-top: 3rem;
  font-size: 0.9rem;

  .footer-body {
    font-size: 0.8rem;

    .btn {
      background-color: $color-primary;
      color: $color-primary-light;
      margin-top: 8px;
      margin-bottom: 8px;
      font-size: 0.9rem;

      &:hover {
        background-color: $color-primary-hover;
        text-decoration: none;
      }
    }
  }
}


// CHOICE and SELECTION

// pipe style lists (outline tags for navigation)

.pipe-list {
  padding-top: 0 !important;
  padding-inline-start: 0;
  text-align: center;

  li {
    display: inline;
    white-space: nowrap;
    font-size: 1em;

    margin: 0.5em 0.25em;

    a {
      line-height: 2.6em;

      border-style: solid;
      border-width: 2.5px;
      border-radius: 0.25em;
      border-color: $border-color;
      padding: 0.25em 0.5em;

      &:hover {
        box-shadow:
          0px 5px 5px -3px rgba(0, 0, 0, 0.2),
          0px 8px 10px 1px rgba(0, 0, 0, 0.14),
          0px 3px 14px 2px rgba(0, 0, 0, 0.12);
        background-color: $code-bg-color;
        text-decoration: none !important;
        cursor: pointer;
      }
    }
  }
}

.choice-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  :first-child {
    // override base
    margin-top: auto;
  }

  margin: 25px auto;
}

.choice-card {

  display: flex;
  flex-direction: column;

  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.3;

  width: 9.4rem;
  height: 6.5rem;

  margin: 0.5rem;
  padding: 0.7rem;
  border-radius: 1.2rem;

  @include mobile {
    display: block;
    text-align: left;

    width: 100%;
    height: auto;

    margin: 0.5rem;
    padding: 1rem;
    border-radius: 1rem;
  }

  transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
     0px 5px 5px -3px rgba(0, 0, 0, 0.2),
     0px 8px 10px 1px rgba(0, 0, 0, 0.14),
     0px 3px 14px 2px rgba(0, 0, 0, 0.12);

  &:hover {
    box-shadow:
      0px 10px 10px -3px rgba(0, 0, 0, 0.2),
      0px 16px 20px 1px rgba(0, 0, 0, 0.14),
      0px 6px 28px 2px rgba(0, 0, 0, 0.12);

    background-color: $code-bg-color;
    text-decoration: none !important;
    cursor: pointer;
  }

  &:active {
    box-shadow:
      0px 15px 15px -3px rgba(0, 0, 0, 0.2),
      0px 24px 30px 1px rgba(0, 0, 0, 0.14),
      0px 9px 40px 2px rgba(0, 0, 0, 0.12);

    background-color: $color-primary-light;
  }

  .choice-body {
    color: $body-text-color;
    font-size: 1.0rem;

    margin: auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
