@import 'button.css';
@import 'dialog.css';

html {
  background-color: black;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #9ab9ce;
  padding: 0;
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}



/* IconButton */
.icon-button {
  border: 0;
  background-color: transparent;  
  fill: #3a638b;
  cursor: pointer;
  padding: 0;
}
.icon-button:hover,
.icon-button:active {
  fill: #6497ca;
}
.icon-button svg {
  width: 20px;
  height: 20px;
}


.controls {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.control-move-button {
  width: 40px;
  height: 40px;
  font-size: 20px;
  line-height: 30px;
  color: inherit;
  background-color: #222;
  border: 0;
  border-radius: 100%;
  text-align: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.control-move-button:active {
  background-color: rgb(64, 103, 134);
}
#btnUp { transform: rotate(0deg) }
#btnLeft { transform: rotate(-90deg) }
#btnRight { transform: rotate(90deg) }
#btnDown { transform: rotate(180deg) }



/* Solver Button */

#btnSolver {
  font-size: 0;
}
#btnSolver.rotate {
  animation: rotate 1s linear infinite;
}
@keyframes rotate {
  from{transform: rotate(0deg);}
  to{transform: rotate(360deg);}
}


#board {
  position: relative;
  display: inline-block;
}

/* Table */
.boardTable {
  border: 2px solid #bfc2c5;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ddd;
}
.boardTable td { 
  border: 2px solid transparent;
  width: 38px;
  height: 38px;
  background-color: rgb(31, 31, 31);
  box-sizing: border-box;
  padding: 5px;
  box-shadow: 0 0 13px rgba(0,0,0,.41) inset;
}
.boardTable td.wall-up { border-top-color: inherit }
.boardTable td.wall-left { border-left-color: inherit }
.boardTable td.wall-right { border-right-color: inherit }
.boardTable td.wall-down { border-bottom-color: inherit }

.goal {
  width: 100%;
  height: 20%;
  transform: rotate(45deg);
  opacity: 0.5
}
.goal.visited {
  opacity: 1;
}
.goal:before {
  content: '';
	width: 100%;
	height: 100%;
	transform: rotate(90deg);
	background-color: inherit;
	display: block;
}
.goal-0 {background-color: hsl(0, 80%, 40%)}
.goal-1 {background-color: hsl(140, 80%, 40%)}
.goal-2 {background-color: hsl(220, 80%, 40%)}
.goal-3 {background-color: hsl(60, 80%, 40%)}


.start {
  display: block;
  margin: auto;
  width: 100%;
  height: 100%;
  border: 0 solid;
  border-radius: 100%;
  box-sizing: border-box;
}
.start-0 {background-color: hsla(0, 80%, 25%, 0.5);}
.start-1 {background-color: hsla(140, 80%, 20%, 0.5);}
.start-2 {background-color: hsla(220, 80%, 25%, 0.5);}
.start-3 {background-color: hsla(70, 80%, 25%, 0.5);}



.dot {
  position: absolute;
  width:10px;
  height:10px;
  border-radius: 100%;
  background-color: rebeccapurple;
}


.robot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rebeccapurple;
  transition: transform 0.3s, box-shadow 0.5s, opacity 0.5s;
  opacity: 0.4;
  box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 1);
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 14px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.robot.active {
  opacity: 1;
  box-shadow: 0 3px 4px 1px rgba(0, 0, 0, 0.3);
  margin-top: -1px;
}
.robot-0 {background-color: hsl(0, 50%, 30%)}
.robot-1 {background-color: hsl(140, 50%, 30%)}
.robot-2 {background-color: hsl(220, 50%, 30%)}
.robot-3 {background-color: hsl(60, 50%, 30%)}



/* Color Controls */

#colorControls button {
  width: 40px;
  height: 40px;
  border: 0;
  margin: 0 0.5rem 0.5rem 0;
  background-color: #333;
  color: white;
  opacity: 0.6;
  cursor: pointer;
  outline: 0;
}
#colorControls button.selected {
  opacity: 1;
}
#colorControls .color0 { background-color: hsl(0, 50%, 30%)}
#colorControls .color1 { background-color: hsl(140, 50%, 30%)}
#colorControls .color2 { background-color: hsl(220, 50%, 30%)}
#colorControls .color3 { background-color: hsl(60, 50%, 30%)}



/* Active route */
#movesMade {
  display: flex;
  flex-wrap: wrap;
}

#movesMade span {
  font-size: 0.8rem;
  margin: 0.2rem;
  background-color: #333;
  padding: 2px 5px;
}