@use "sass:color";

html, body {
  height: 100%;
  overscroll-behavior: none;
}

$bgcolor: #006060;
$txcolor: #ffffff;

$divider-color: color.adjust($bgcolor, $lightness: -2%);

$code-bg: #225588;

* {
  box-sizing: border-box;
  line-height: 1.5;
}

body {
  color: $txcolor;
  text-shadow: 0.5px 0.5px color.invert($txcolor);
  font: 0.9em verdana;
  background: $bgcolor;
  margin: 0;

  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  color: #00ff44;
  font-family: verdana;
  font-weight: bold;
}

h1 {
  font-size: 1.5em;
}

h2 {
  font-size: 1em;
}

hr {
    border: solid 1px $divider-color;
    margin: 1em 0;
}

a {
  color: #ffff00;
  text-decoration: none;
}
a:hover {
  color: #00ff44;
  text-decoration: underline;
}

ul {
  color: #ffffff;
  list-style-type: disc;
  padding-left: 10px;
}

.clear { clear: both; }
.hidden { display: none; }

ul.main-menu {
  margin-left: 16px;
  li {
    padding-bottom: 20px;
  }
}

table {
  width: 100%;
  font-size: 80%;

  border-spacing: 0;
  border-collapse: separate;

  td {
    padding: 0;
    color: #000000;
    text-shadow: none;
    background-color: #DDDDDD;
    border-color: #333333 #FFFFFF #FFFFFF #333333;
    border-style: ridge;
    border-top-width: thin;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin
  }
}

nav {
  padding: 0 32px;
  height: 45px;

  display: flex;
  flex-direction: row;

  border-bottom: 4px solid $divider-color;

  h1 {
    font-size: 12pt;
    flex: 1;
  }

  img {
    height: 100%;
  }
}

main {
  height: 100%;
  display: flex;
  overflow: scroll;

  $sidebar-width: 280px;
  .sidebar {
    flex: 0 0 $sidebar-width;
    max-width: $sidebar-width;
    overflow: scroll;

    padding: 0 32px 0 16px;
    border-right: 2px solid $divider-color;

    display: flex;
    flex-direction: column;
    ul {
      flex: 1;
    }

    .author {
        text-align: center;
    }
  }

  .content {
    flex-grow: 1;
    overflow: scroll;
    padding: 0 32px 16px 32px;
    border-left: 2px solid $divider-color;
  }
}

// TODO: make prettier
@mixin code {
  background-color: $code-bg;
  color: #eeeeee;
  text-shadow: none;
  border: 1px solid #000;
  border-radius: 3px;
  font-family: monospace;
}

kbd {
  @include code;
  padding: 2px;
}

code {
  @include code;
  display: block;
  padding: 0.5em;

  font-size: 1rem;

  pre {
    padding: 0;
    margin: 0;
  }
}

.full-page {
  padding: 0 32px;
}

.command-reference {
  #search {
    width: 100%;
    margin-top: 8px;
    outline: none;
  }

  .toggle-group {
    display: flex;
    border: 1px solid color.adjust($bgcolor, $lightness: -2%);
    border-radius: 2px;

    background: color.adjust($bgcolor, $lightness: -10%);

    a {
      flex: 1;
      text-align: center;

      &:first-child { border-right: 1px solid #ffffff; }
      &:last-child { border-left: 1px solid #ffffff; }

      //color: color.adjust($bgcolor, $lightness: 2%);
    }
  }


}

.v-stack {
  display: flex;
  flex-direction: column;
}

.scancodes {
  font-family: arial;
  margin-bottom: 20px;

  .table {
    font-size: 10px;
  }

  .w-12 { width: 12px; }
  .w-16 { width: 16px; }
  .w-24 { width: 24px !important; }
  .w-28 { width: 28px !important; }
  .w-34 { width: 34px !important; }
  .w-38 { width: 38px !important; }
  .w-44 { width: 44px !important; }
  .w-46 { width: 46px !important; }
  .w-56 { width: 56px !important; }
  .w-62 { width: 62px !important; }
  .w-66 { width: 66px !important; }
  .w-68 { width: 68px !important; }
  .w-72 { width: 72px !important; }
  .w-90 { width: 90px !important; }
  .w-126 { width: 126px !important; }
  .w-156 { width: 156px !important; }
  .w-full { width: 100% !important; }

  .h-12 { height: 12px; }
  .h-16 { height: 16px; }
  .h-28 { height: 28px; }

  .row {
    display: flex;
    flex-direction: row;
  }

  .key {
    cursor: pointer;
    width: 28px;
    height: 28px;

    color: #000;
    text-shadow: none;
    background-color: #cec6ad;
    border: 1px solid #b5a584;
    border-radius: 2px;
    &:hover {
      background-color: color.adjust(#cec6ad, $lightness: -5%);
      border-color: color.adjust(#b5a584, $lightness: 1%);
    }

    display: flex;
    justify-content: center;
    align-items: center;
  }

  .arrow {
    font-size: 16px;
  }

  .enter-top {
    border-bottom: none;
    border-bottom-right-radius: 0;
  }
  .enter-bottom {
    border-top: none;
    border-top-right-radius: 0;
  }
  .top-half {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .bottom-half {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}
