/*
 * CSS for NEMSIS state map
 */

/* Colors */

.legend .l0 {
  background-color: #999999;
}

.legend .l1 {
  background-color: #ffcc00;
}

.legend .l2 {
  background-color: #9900ff;
}

.legend .l3 {
  background-color: #00cc00;
}

.l0 .state {
  fill: #999999;
}

.l1 .state {
  fill: #ffcc00;
}

.l2 .state {
  fill: #9900ff;
}

.l3 .state {
  fill: #00cc00;
}

/* Body */

body {
  font-family: Open Sans, sans-serif;
}

/* SVG Map */

/* Make IE scale the SVG correctly without ruining things in other browsers */
#map {
  display: inline-block;
  position: relative;
  width: 100%;
}

#map .spacer {
  padding-top: 67%;
}

.legend {
  display: flex;
  justify-content: space-around;
}

.legend p {
  padding: 0 5px 0 35px;
  margin: 5px 0;
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
}

.legend span.key {
  display: block;
  height: 22px;
  width: 22px;
  float: left;
  margin-right: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  margin: auto;
}

#map svg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* End of IE scaling code */

.state {
  fill: grey;
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
}

svg text {
  fill: #ffffff;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  text-anchor: middle;
}

svg a {
  cursor: default;
}

svg a {
  cursor: pointer;
}

svg a:hover .state,
svg a:focus .state {
  opacity: 0.8 !important;
}
