---
---

@import 'jekyll-theme-cayman';

$padding: 20px;
$sidebar-width: 300px;
$sidebar-transition: left 0.25s;
$container-width: 1024px;

body {
  overflow: scroll;
}

a[href^="http"]:after {
  content: "";
  display: inline-block;
  transform: translate(0px, 2px);
  width: .9em;
  height: .9em;
  margin-left: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23777'%3E%3Cpath d='M20 3h-5a1 1 0 1 0 0 2h3L8 14a1 1 0 1 0 2 2l9-10v3a1 1 0 1 0 2 0V4a1 1 0 0 0-1-1zM5 3L3 5v14l2 2h14l2-2v-6a1 1 0 1 0-2 0v6H5V5h6a1 1 0 1 0 0-2H5z'/%3E%3C/svg%3E");
  background-size: cover;
}

#container {
  position: relative;
  max-width: $container-width;
  margin: 0 auto;
}

#main-content, #sidebar {
  padding: $padding 0;
}

#main-content code:not(pre code, a code) {
  color: #c7254e;
  font-size: 0.9em;
  background-color: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 3px;
  margin: 0 2px;
  padding: 0 5px;
}

#sidebar {
  position: fixed;
  background: white;
  top: 0;
  bottom: 0;
  width: $sidebar-width;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  z-index: 1;

  .github-repo {
    display: inline-block;
    padding-left: 3.75em;
    font-size: .85em;
  }
}

#sidebar-toggle-link {
  font-size: 24px;
  position: fixed;
  background-color: white;
  opacity: 0.75;
  box-shadow: 1px 1px 5px #aaa;
  left: $sidebar-width;
  padding: 5px 10px;
  display: none;
  z-index: 100;
  text-decoration: none !important;
  color: #aaa;
}

#main-content {
  position: relative;
  padding: $padding;
  padding-left: $sidebar-width + $padding;
}

.nav-link.active {
  text-decoration: underline;
}

a > span {
  text-decoration: inherit;
}

.table-of-contents-section {
  border-bottom: 1px solid #ccc;
}

.logo {
  display: block;
}

.table-of-contents-section.active {
  background-color: #edffcb;
}

.table-of-contents-section {
  padding: 10px 20px;
}

#table-of-contents {
  ul {
    padding: 0;
    margin: 0;
  }

  li {
    display: block;
    padding: 5px 20px;
  }
}

@media (max-width: 900px) {
  #sidebar {
    left: 0;
    transition: $sidebar-transition;
  }

  #sidebar-toggle-link {
    display: block;
    transition: $sidebar-transition;
  }

  #main-content {
    left: $sidebar-width;
    padding-left: $padding;
    transition: $sidebar-transition;
  }

  body.sidebar-hidden {
    #sidebar {
      left: -$sidebar-width;
    }

    #main-content {
      left: 0;
    }

    #sidebar-toggle-link {
      left: 0;
    }
  }
}

#playground-container {
  .CodeMirror {
    height: auto;
    max-height: 350px;
    border: 1px solid #aaa;
  }

  .CodeMirror-scroll {
    height: auto;
    max-height: 350px;
  }

  h4, select, .field, label {
    display: inline-block;
    margin-right: 20px;
  }

  #logging-checkbox {
    height: 15px;
  }

  .CodeMirror div.CodeMirror-cursor {
    border-left: 3px solid red;
  }

  h4#about {
    margin: 10ex 0 0 0;
  }
}

#output-container {
  padding: 0 10px;
  margin: 0;
}

#output-container-scroll {
  padding: 0;
  position: relative;
  margin-top: 0;
  overflow: auto;
  max-height: 350px;
  border: 1px solid #aaa;
}

a.highlighted {
  background-color: #ddd;
  text-decoration: underline;
}

.query-error {
  text-decoration: underline red dashed;
  -webkit-text-decoration: underline red dashed;
}
