/* layout settings */
#main {
  position: fixed;
  display: flex;
  width: 100%;
  top: 60px;
  height: calc(100% - 60px);
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 10px;
  background-color: #e3e3e3;
  overflow: hidden;
}

.svg-div, .tbl-div {
  transition: all ease-in-out 0.5s;
  padding: 20px;
  border-radius: 5px;
  height: 100%;
  background-color: white;
  box-shadow: 0 0 3px #B0BEC5;
  min-width: 50%;
}

.tbl-div {
   overflow-x: auto;
}

/*moveEverything left/right */
.moveRight {
  transform: translateX(200%);
}

.moveLeft {
  transform: translateX(-200%);
}

.expand {
  min-width: 100%;
  transform: translateX(-50%);
}

.mid {
  min-width: 100%;
  /*transform: translateX(50%);*/
}

svg {
  display: inline-block;
  margin: auto;
  width: 100%;
  height: 100%;
}

/* attempt to use media queries */
@media (max-width: 600px), (orientation: portrait) {

  #main {
    position: fixed;
    width: 100%;
    flex-direction: column;
  }

  .svg-div, .tbl-div {
    transition: all ease-in-out 0.5s;
    width: 100%;
    min-height: 50%;
  }

  svg {
    height: 100%;
  }

  .tbl-div {
    overflow-y: auto;
  }

  /* move everything up/down */
  .moveRight {
    transform: translateY(200%);
  }

  .moveLeft {
    transform: translateY(-200%);
  }

  .mid {
    min-height: 100%;
    /*transform: translateY(50%);*/
  }

  .expand {
    min-height: 100%;
    transform: translateY(-50%);
  }

  label {
    display: none;
  }

}

/* navigation bar */
#control {
  width: 100%;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  height: 60px;
  background-color: #12508a;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  margin: 0;
  padding: 0;
}

.menu li {
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
  font-size: 15px;
  margin: 5px;
  transition: all ease 0.3s;
  padding: 7px;
  border-radius: 3px;
}

.menu li:hover {
  color: rgba(255, 255, 255, 1);
}

.glyphicon {
  font-size: 15px;
}

#selectVar {
  height: 45px;
}

.form-div {
  margin: 15px 0px;
}

label {
  color: rgba(255, 255, 255, 0.8);
  margin-right: 5px;
  font-weight: normal;
}

/* style help overlay */
.help-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: -1;
  transition: all ease 0.5s;
  overflow-y: auto;
}

.help-info {
  padding: 10px;
  margin: auto;
  color: black;
  background-color: white;
  border-radius: 5px;
  text-align: center;
}

.title {
  font-size: 25px;
}

.move {
  opacity: 1;
  z-index: 5;
}

.logo {
  width: 20%;
}

/*** TABLE PROPERTIES ***/
/*totals column  or totals row */
table {
  width: 100% !important;
}

td, th {
  text-align: center;
  word-wrap: break-word;
  font-size: 12px;
}

/* table headings */
.headings {
  font-style: italic;
  font-weight:normal;
  text-decoration: underline;
  text-align: center;
  align: center;
}

/* groups for two way bar plots */
.yGroup, .tc {
  text-align: center;
  font-weight: bold;
}

.Percentage {
  background-color:rgb(0, 0, 255);
  color: white;
  opacity: 0.75;
  margin-left: 10px;
}

.Count {
 background-color: purple;
 opacity: 0.75;
 color: white;
 margin-left: 10px;
}

.trend-info, .brush-info {
  color: white;
}

/* textlabels */
.label {
  font-size: 10;
  fill: black;
  stroke: none;
  fill-opacity: 1;
  text-anchor: middle;
  visibility: inherit;
  font-weight: normal;
}

/* BAR PROPERTIES (for bar charts) */
.bar {
  stroke: none;
  visibility: visible;
  opacity: 1;
}

.bar:hover {
  stroke-width: 50%;
  fill-opacity: 0.5;
}

/* upon selection */
.selected {
  opacity: 1;
  visibility: visible;
}

.none {
  opacity: 0.2;
}

.hidden {
  display: none;
  visibility: hidden;
}

/*highlighting data */
.totalRow, .tabSelect, .select {
  align: center;
  font-weight: bold;
}

.rowSelect {
  display: table-row;
  opacity: 1;
}

/* legend interactions and styling */
.show {
  font-size: 115%;
  fill-opacity: 0.5;
}

.out {
  font-size: 100%;
  fill-opacity: 1;
}

.keyText {
  fill: black;
}

/* for box plots - dot plots, histograms */
.box {
  fill: gray;
  fill-opacity: 0.5;
}

.fillBox {
  fill-opacity: 0.2;
}

/* for dot plots and scatter plots */
.point:hover { /* showPoint */
  fill: currentColor;
  stroke-width: 50%;
  fill-opacity: 1;
}

/* for histograms and hexbins */
.histBar {
  stroke: white;
  stroke-width: 0.25;
}

.hexbin {
  stroke: none;
}

.hexbin:hover, .histBar:hover {
  fill-opacity: 0.5;
}

div.tooltip {
    position: absolute;
    text-align: center;
    padding: 5px;
    z-index: 5;
    opacity: 1;
    visibility: hidden;
    font: 11px sans-serif;
    background: white;
    border: 1px solid lightgray;
    border-radius: 5px;
    pointer-events: none;
}

span {
  font-weight: bold;
}

/* for iNZightMaps */
.selectRegion {
  stroke: darkgray;
  fill: black;
  fill-opacity: 0.5;
}

/* line chart container */
.spark-div {
  width: 100%;
  padding: 10px;
  clear: left;
}

/* ggplot2 theme for sparkline chart */
.grid-background {
  fill: #ddd;
}

.spark-xaxis path, .spark-yaxis path {
  display: none;
}

.grid-lines {
  stroke: #fff;
  stroke-width: 0.75px;
}

.grid path {
  display: none;
}

.minor {
  stroke-opacity: 0.5;
  stroke-width: 0.5px;
}

.grid text {
  display: none;
}

/* lines on the chart */
.spark-line {
  fill: none;
  stroke: black;
  opacity: 0.2;
  stroke-width: 1.5;
}

.follow-text {
    stroke: white;
    fill: black;
    stroke-width: 0.05;
    font-size: 12px;
    text-anchor: middle;
}

.region-lab {
  font-size: 13px;
}

.x-lab, .spark-title, .main-title {
  text-anchor: middle;
}

.x-lab, .y-lab {
  font-size: 16px;
}

.main-title, .spark-title {
  fill: black;
  fill-opacity: 1;
  font-size: 18px;
}

.x-line {
  stroke: black;
  stroke-width: 0.5;
}

/* time slider */
.slider-div {
  width: 100%;
}

.slider {
  -webkit-appearance: none;
  height: 5px;
  border-radius: 5px;
  background: lightgray;
  width: calc(100% - 15px);
  display: inline-block;
}

/* circle thumb */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: black;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}

.slider-val {
  width: 55px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 12px;
  margin: auto;
}

.slider::-webkit-slider-thumb:hover {
  background: darkgray;
}

/* play-pause button */
.play-pause {
    text-align: center;
    margin: auto;
    width: 100%;
}

.group-mean-label {
  pointer-events: none;
}
