/**
 * minimax.css
 * 04/27/2021
 * 
 * Defines all styles to be used in the minimax and alpha-beta pruning visualization.
 *
 * @author Alexander Luiz Costa
 */
* {
  box-sizing: border-box;
}

.minimax-container {
  position: relative;
  width: 100%;
  height: 40vw;
  border: 2px solid #57BA98;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.minimax-node {
  position: absolute;
  cursor: pointer;
  z-index: 10;
}

.minimax-node-wrapper {
  position: relative;
}

.minimax-node-wrapper > * {
  position: absolute;
  top: 0px;
  left: 0px;
}

.minimax-node-id {
  width: 50px;
  height: 50px;
  top: -24px;
  text-align: center;
  font-weight: bold;
}

.minimax-node-value {
  width: 50px;
  height: 50px;
  line-height: 45px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

.minimax-node.triangle svg polygon {
  stroke-linejoin: round;
  stroke-linecap: round;
}

.minimax-node.triangle.down svg {
  transform: rotate(180deg);
}

.minimax-edge {
  height: 10px;
  width: 0px;
  position: absolute;
  background: #ddd;
  transform-origin: 5px 50%;
}

.minimax-control-center {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.minimax-button-container {
  display: inline-block;
  margin-left: 16px;
  margin-right: 16px;
}

.minimax-button-container:first-of-type {
  margin-left: 0px;
}
.minimax-button-container:last-of-type {
  margin-right: 0px;
}

.minimax-button.left {
  border-right: 1px solid #bbb;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
}

.minimax-button.middle {
  border-right: 1px solid #bbb;
  border-left: none;
  border-radius: none;
}

.minimax-button.right {
  border-left: none;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

.minimax-indicator-container {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #e63946;
  z-index: 50;
  background: white;
}

.minimax-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  margin-right: 8px;
}

.minimax-utility-input-container {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
  background: white;
}

.minimax-utility-input-container > * {
  margin: 0px;
}

.button-primary:disabled:hover,
.button-primary:disabled {
  background: #ccc;
  border-color: #aaa;
}

.minimax-execution-buttons {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
}

.minimax-execution-buttons > button {
  margin-left: 8px;
  margin-right: 8px;
}

.minimax-execution-buttons > button:first-of-type {
  margin-left: 0px;
}

.minimax-execution-buttons > button:last-of-type {
  margin-right: 0px;
}

.minimax-tooltip {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  text-align: justify;
  margin-bottom: 0px;
  background: #57BA98;
  padding-left: 8px;
  padding-right: 8px;
  color: white;
  padding-top: 4px;
  z-index: 50;
  border-top: 1px solid #bbb;
}

.minimax-legend {
  width: 100%;
  margin-bottom: 0px;
}

.minimax-legend:last-of-type {
  margin-bottom: 100px;  
}

.minimax-alphabeta-window {
  position: absolute;
  top: 16px;
  left: 16px;
  border: 2px solid #57BA98;
  border-radius: 4px;
  padding: 16px;
  z-index: 50;
  background: white;
}

.minimax-alphabeta-window.inverted {
  border: 1px solid #bbb;
  color: white;
}

.minimax-alphabeta-window > p {
  margin-bottom: 0px;
  font-weight: bold;
}
