$td-game__item__margin-bottom: 20px;

///////////////////
//               //
//   Game-wide   //
//               //
///////////////////

.td-game {
  background-color: $background-color--main;
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.td-game__loading-container {
  position: absolute;
  left: 50%;
  bottom: 50%;
}


/////////////////
//             //
//   Sidebar   //
//             //
/////////////////

.td-game__sidebar {
  background-color: $background-color--main;
  color: hsla(0, 0%, 90%, 0.75);
  display: flex;
  flex: 1 0 40%;
  flex-direction: column;
  font-family: $font-family--standard;
  min-width: 345px;
  overflow-y: auto;
  padding: 20px 30px 0px;
}

////////////////
//            //
//   Header   //
//            //
////////////////

@media (max-width: 1205px) {
  .td-game__header {
    align-items: center;
    flex-direction: column;
  }

  .header__title {
    margin-bottom: 20px;
    font-size: 25px;
    font-weight: 600;
  }
}

@media (min-width: 1206px) {
  .header__title {
    font-size: 25px;
    font-weight: 600;
  }
}

.td-game__header {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: $td-game__item__margin-bottom;
  min-width: 270px;
}

.header__title {
  font-size: 25px;
  font-weight: 600;
}

// Navigation
.header__nav {
  position: relative;
}

.nav__button {
  background-color: hsla(0, 0%, 10%, 0.5);
  border-radius: 4px;
  color: desaturate(lighten($background-color--main, 10%), 20%);
  display: inline-block;
  font-family: 'PT Sans', sans-serif;
  font-size: 16px;
  margin-left: 3px;
  padding: 0.4em 0.8em;

  &:first-child {
    margin-left: 0px;
  }
}

.nav__button--active {
  $nav__background-color--active: hsla(0, 0%, 10%, 0.5);

  background-color: $nav__background-color--active;
  color: hsl(0, 0%, 100%);
  cursor: pointer;

  &:first-child {
    margin-left: 0px;
  }

  &:hover {
    background-color: darken($nav__background-color--active, 20%);
  }
}

.button__menu {
  position: absolute;
  left: 20px;
  top: 45px;
  z-index: 2;
  width: 165px;

  &:before {
    border-left: solid transparent 8px;
    border-right: solid transparent 8px;
    border-bottom: solid hsla(0, 0%, 10%, 0.7) 8px;
    content: " ";
    height: 0;
    top: -8px;
    left: 48%;
    position: absolute;
    width: 0;
  }
}

.menu__wave-links {
  background-color: hsla(0, 0%, 10%, 0.7);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  padding: 10px 10px 0px;
  width: 101%;
}

.menu__wave-link {
  background-color: lighten($background-color--main, 10%);
  border-radius: 3px;
  color: hsl(0, 0%, 90%);
  font-weight: 400;
  height: 30px;
  width: 29px;
  margin: 0 10px 10px 0;

  &:nth-child(4) {
    margin-right: 0
  }

  &:nth-child(8) {
    margin-right: 0
  }

  &:last-child {
    margin-right: 0;
  }
}

.menu__wave-link--active {
  background-color: hsl(0, 0%, 85%);
  color: hsl(0, 0%, 10%);
  cursor: pointer;

  &:hover {
    background-color: hsl(0, 0%, 100%);
  }
}

//////////////////////
//                  //
//   Instructions   //
//                  //
//////////////////////

.sidebar__instructions {
  flex: 0 0 auto;
  margin-bottom: $td-game__item__margin-bottom;

  ul {
    list-style: disc;
    padding-left: 35px;
  }
}

.text__code {
  background-color: hsla(0, 0%, 0%, 0.3);
  color: hsl(0, 0%, 90%);
  cursor: help;
  padding: 0px 5px 2px;
}

$tooltip--color: hsla(0, 0%, 10%, 0.85);
.instructions__tooltip {
  display: none;
  position: absolute;

  color: hsl(0, 0%, 85%);
  cursor: default;
  font-family: $font-family--monospace;
  font-weight: 500;
  position: absolute;
  max-width: 300px;
  z-index: 2;

  & p {
    font-size: 12px;
  }
}

.tooltip__caret {
  border-left: solid transparent 8px;
  border-right: solid transparent 8px;
  content: " ";
  height: 0;
  margin-top: 4px;
  margin-left: 20px;
  width: 0;
}

.tooltip__caret--below {
  -webkit-animation: emerge-down 0.25s ease-out;
     -moz-animation: emerge-down 0.25s ease-out;
          animation: emerge-down 0.25s ease-out;
}

.tooltip__caret--below {
  border-bottom: solid $tooltip--color 8px;
}


.tooltip__content--below {
  -webkit-animation: emerge-down 0.25s ease-out;
     -moz-animation: emerge-down 0.25s ease-out;
          animation: emerge-down 0.25s ease-out;
}

.tooltip__text {
  background-color: $tooltip--color;
  border-radius: 2px;
  padding: 10px;
}

/////////////////
//             //
//   Overlay   //
//             //
/////////////////

.overlay {
  background-color: hsla(0, 0%, 0%, 0.55);
  font-family: $font-family--standard;
  height: 100vh;
  left: 0;
  overflow: auto;
  padding-top: 3%;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 2;
}

.modal {
  background-color: hsl(0, 0%, 80%);
  border-radius: 2px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 20px;
  width: 650px;

  ul {
    list-style: disc;
    padding-left: 35px;
  }
}

.instructions__diagram {
  height: 200px;
  margin-left: 22%;
}

.modal__actions {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.modal__button {
  background-color: $background-color--main;
  border-radius: 4px;
  color: hsl(0, 100%, 100%);
  cursor: pointer;
  display: inline-block;
  font-family: $font-family--standard;
  font-size: 16px;
  padding: 0.7em 1.2em;

  &:hover {
    background-color: darken($background-color--main, 7.5%);
  }
}

.modal__support-link, a.support__twitter-link {
  color: $background-color--main;
  cursor: pointer;
  font-family: $font-family--standard;
  text-decoration: underline;

  &:hover {
    color: lighten($background-color--main, 15%);
    text-decoration: underline;
  }
}

.modal__support {
  align-items: center;
  display: flex;
  flex-direction: column;

}

.support__form {
  margin: 30px 0;
}

.modal code {
  background-color: hsl(0, 0%, 70%);
  font-family: $font-family--monospace;
  padding: 0px 3px;
}

////////////////
//            //
//   Footer   //
//            //
////////////////

.sidebar__footer {
  font-weight: 300;
  margin-bottom: 20px;
  opacity: 0.5;
  text-align: center;
}

.footer__text {
  font-size: 12px;
}

.footer__link {
  &:hover {
    color: white;
  }
}

/////////////////
//             //
//   Twitter   //
//             //
/////////////////

.custom-follow-button {
  display: flex;
  justify-content: center;
  margin: 1em auto 2em;
}

.custom-follow-button a {
  position: relative;
  display: inline-block;
  height: 30px;
  padding: 2px;
  border: 1px solid #ccc;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  font-weight: bold;
  background-color: #F8F8F8;
  background-image: -webkit-gradient(linear,left top,left     bottom,from(#FFF),to(#DEDEDE));
  background-image: -moz-linear-gradient(top,#FFF,#DEDEDE);
  background-image: -o-linear-gradient(top,#FFF,#DEDEDE);
  background-image: -ms-linear-gradient(top,#FFF,#DEDEDE);
  border: #CCC solid 1px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.custom-follow-button a:hover {
  border-color: #BBB;
  background-color: #F8F8F8;
  background-image: -webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#D9D9D9));
  background-image: -moz-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: -o-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: -ms-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: linear-gradient(top,#F8F8F8,#D9D9D9);
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

.custom-follow-button a .btn-icon {
  position: absolute;
  width: 16px;
  height: 13px;
  top: 56%;
  left: 3px;
  margin-top: -6px;
  background: url('https://twitter.com/favicons/favicon.ico') 1px center no-repeat;
  background-size: 13px;
}

.custom-follow-button a .btn-text {
  display: inline-block;
  padding: 5px 3px 0 20px;
}

@import
  "td-game/board",
  "td-game/stylesheet",
  "td-game/tool-tip";
