// GENERAL
.game-board {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 55px;
  display: flex;
  justify-content: space-between;
}

.main-window {
  display: flex;
  flex-direction: row;
}

.card-pile {
  padding: 0px;
  position: relative;
  margin: 5px 7px;

  &.vertical {
    height: @card-height;
    width: @card-width;
  }

  &.horizontal {
    height: @card-width;
    width: @card-height;
  }
}

.player-home-row .card-pile.horizontal {
    margin-bottom: auto;
    margin-top: auto;
}

.popup {
  z-index: @layer-card-menu;

  .inner {
    display: flex;
    flex-wrap: wrap;
  }

  a {
    display: inline-block;
    margin: 0 10px 8px 4px;
    text-decoration: none;

    &:hover {
      color: @brand-info;
      cursor: pointer;
    }
  }
}

.select-cursor {
  cursor: url(/img/crosshairs.cur), default;
}

// LEFT SIDE
.left-side {
  width: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.player-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.player-stats {
  width: 144px;
}

.player-stats b {
  max-width: calc(~"100% - 40px");
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.state {
  height: 27px;

  span {
    padding-right: 5px;
  }
}

.btn-stat {
  padding: 0;
  font-size: 12px;
  line-height: 18px;
  height: 22px;
  width: 22px;
  background-color: transparent;
  border-color: black;
  color: white;
}

.btn-stat:hover {
  background-color: rgba(0,128,0,0.35);
  border-color: @brand-primary;
  color: white;
}

.btn-stat:focus {
  outline: 0px;
  color: white;
}

.deck-info {
  display: flex;
  flex-direction: column;
}

.player-info.our-side .deck-info {
  justify-content: flex-end;
}

.deck-type {
  display: flex;
  flex-direction: row;
  height: 100px;
}

.first-player-indicator {
  margin: 5px 7px;
  padding: 5px;
  text-align: center;
  background: rgba(183, 183, 183, 0.12);
  border-radius: 0.25rem;
  border: 1px solid rgba(128, 128, 128, 0.53);
}

.middle {
  display: flex;
  flex-direction: row;
  flex: 1;
}

.plots-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.plot-group {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;

  &.our-side {
    justify-content: flex-start;
  }
}

.plot {
  margin: 5px;
 
  .popup.panel {
    position: absolute;
    width: 200px;
    min-height: 92px;
    left: 75px;
    top: 0;
    transform: translateY(-50%);
    background-color: black;
    &.hidden {
      display: none;
    }
  }

  // &:hover > .popup.panel.hidden, .popup.panel.hidden:hover {
  //   display: block !important;
  // }
}

.arrow-indicator {
  position: absolute;
  left: -10px;
  top: calc(~"50% + 10px");
  display: inline-block;
  height: 20px;
  width: 20px;
  background-color: black;
  transform: rotate(45deg);
  border: 1px solid rgba(71, 58, 56, 0.95);
  border-top: none;
  border-right: none;
}

.middle-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.inset-pane {
  display: flex;
  flex-direction: column;
  width: 210px;
  justify-content: space-between;
}

.inset-pane > div {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.menu-pane-source {
  background: rgba(160, 160, 160, 0.25);
  font-size: 14px;
  font-weight: normal;
  margin: 0 5px;
  padding: 4px;
  text-align: center;
}

.menu-pane {
  text-align: center;
  z-index: @layer-prompt;
}

.menu-pane .panel {
  margin-top: 0;
  padding-top: 0;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}

.menu-pane button {
  width: 100%;
  margin-bottom: 5px;
  white-space: normal;
}

.phase-indicator {
  margin: 5px;
  margin-bottom: 0;
  padding: 1px;
  border: 1px solid rgba(71, 58, 56, 0.95);
  border-radius: 4px 4px 0 0;
  border-bottom: none;
  background: rgba(160, 160, 160, 0.25);
  text-align: center;
  text-transform: uppercase;
  width: 200px !important;
  position: relative; 
}

span.up-arrow {
  content: '';
  display: block;
  width: 0;
  height: 0;
  position: absolute;

  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-bottom: 8px solid @brand-primary;
  left: 90px;

  top: -9px;    
}

span.down-arrow {
  content: '';
  display: block;
  width: 0;
  height: 0;
  position: absolute;

  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-top: 8px solid @brand-primary;
  left: 90px;

  top: -9px;    
}

.schemes-pane {
  display: flex;
  flex-direction: row;
  margin: 5px;
  margin-top: 0;
}

// CENTER
.center {
  flex-direction: column;
  display: flex;
}

.play-area, .player-board {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.player-board {
  margin: 10px;
}

.player-board.our-side > div:first-child {
  margin-top: auto;
}

.player-home-row {
  display: flex;
  height: 100px;
}

.deck-cards {
  display: flex;
  height: 100px;
}

.hand {
  height: @card-height;
  width: 342px;
  padding: 0px;
}

.hand.squish .card-wrapper {
  position: absolute;
}

.discard .popup {
  position: absolute;
  left: -100px;
  top: 85px;
  bottom: initial;
  width: 500px;
  min-height: 92px;
  
  .arrow-indicator {
    transform: rotate(135deg);
    top: -11px;
    left: 110px;
  }

  &.our-side {
    top: initial;
    bottom: 85px;

    .arrow-indicator {
      transform: rotate(-45deg);
      top: inherit;
      bottom: -11px;
    }
  }
}

.player-home-row .additional-cards .popup {
  position: absolute;
  left: -380px;
  top: 65px;
  bottom: initial;
  width: 465px;
  min-height: 92px;

  .arrow-indicator {
    transform: rotate(135deg);
    top: -11px;
    left: 400px;
  }

  &.our-side {
    top: initial;
    bottom: 70px;

    .arrow-indicator {
      transform: rotate(-45deg);
      top: inherit;
      bottom: -11px;
    }
  }
}

.dead .popup {
  position: absolute;
  left: -90px;
  top: 65px;
  bottom: initial;
  width: 465px;
  min-height: 92px;
  
  .arrow-indicator {
    transform: rotate(135deg);
    top: -11px;
    left: 100px;
  }

  &.our-side {
    top: initial;
    bottom: 70px;

    .arrow-indicator {
      transform: rotate(-45deg);
      top: inherit;
      bottom: -11px;
    }
  }
}


.draw {
  .popup {
    left: -271px;
    position: absolute;
    bottom: 85px;
    width: 590px;
    min-height: 92px;

    .card {
      margin: 2px;
    }
  }

  .inner {
    height: 450px;
    overflow-y: scroll;
  }
}

.card-row, .hand {
  display: flex;
  justify-content: flex-start;
}

.card-row .card.horizontal {
  margin-bottom: @card-height - @card-width;
}

.player-board .card-wrapper {
  margin-right: 10px;
  margin-bottom: 5px;
}

//RIGHT SIDE
.right-side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 312px;
}

.chat {
  width: 100%;
}
