/* Map specific styles */

.map {
  position: relative;
  user-select: none;
  z-index: 1;
}

.leaflet-labels-pane {
  pointer-events: none;
  z-index: 525;
}

.leaflet-highlight-pane {
  pointer-events: none;
  z-index: 550;
}

.map--tract {
  fill: transparent;
  fill-opacity: 0.8;
  pointer-events: visible !important;
  stroke: none;
}

.map--dot {
  fill: transparent;
  stroke: none;
}

.map--county {
  cursor: default;
  fill: transparent;
  pointer-events: fill !important;
  stroke: gray;
  stroke-opacity: 1;
  stroke-width: 1px;
}

.map--tract.hover,
.map--dot:hover,
.map--county:hover,
.map--hover path,
.highlight {
  stroke: #333 !important;
  stroke-linejoin: round;
  stroke-width: 2px;
}

.map--hover path {
  filL: none;
}

.map--tract.selected {
  /* stroke: #333 !important; */
  stroke-linejoin: round;
  stroke-width: 1px;
}

/* Ranking styles */
.rank-tract {
  stroke: none;
}

.rank-highlighted {
  stroke: #F68229 !important;
  stroke-linejoin: round;
  stroke-width: 2px;
}

.rank-selected {
  stroke: #F68229 !important;
  stroke-width: 8px;
}

/* Reference icons */

.ref-icon {
  -webkit-text-stroke: 1px white;
}


/* Controls */

.leaflet-left .leaflet-control {
  margin-left: 20px;
}

.leaflet-top .leaflet-control {
  margin-top: 20px;
}

.leaflet-right .leaflet-control {
  margin-right: 20px;
}

.pool-btn {
  display: none;
}

.pool-btn.show,
.world-zoom.show {
  display: block;
}

.pool-btn a i,
.world-zoom a i {
  display: block;
  font-size: 1.6rem;
  text-align: center;
}

.pool-btn a i {
  bottom: -1px;
  position: relative;
  right: -2px;
}

.pool-btn .selected i {
  color: #219FE2;
}

/* Legend */
.legend {
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  max-width: 20rem;
}

.legend--title-area, .legend--content-area {
  padding: 0 15px;
}

.legend--title-area {
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: rgb(238,238,238);
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.legend--content-area {
  padding-bottom: 10px;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.legend--title {
  text-align: center;
  font-size: 1.8rem;
  margin: 0;
  margin-bottom: 5px;
}

.legend--subtitle {
  font-size: 1.5rem;
  margin: 0;
}

.legend--healthy-conditions-label {
  font-size: 1.5rem;
  text-align: center;
}

.legend--nodata {
  margin: 10px 0;
  font-size: 1.4rem;
  font-style: italic;
  white-space: nowrap;
}

.legend--nodata > * {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.legend--swatch {
  stroke: none;
}

.legend--axis--x .domain {
  display: none;
}

.legend--axis--x text {
  color: #000;
  fill: #000;
  font-size: 1.5rem;
}

.legend--axis-line {
  stroke: #333;
}

.legend--axis-text--left {
  text-anchor: start;
}

.legend--axis-text--right {
  text-anchor: end;
}

.legend--single-indicator-wrapper,
.legend--ccs-wrapper,
.legend--library-wrapper {
  border-top: 1px solid #ccc;
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.legend--single-indicator-wrapper.show,
.legend--ccs-wrapper.show,
.legend--library-wrapper.show {
  display: block;
}

.legend--single-indicator-derived {
  font-size: 1.5rem;
  margin: 0;
  margin-bottom: 1rem;
}

.legend--single-indicator-text {
  font-size: 1.5rem;
  margin: 0;
  margin-bottom: 1.5rem;
}

.legend--single-indicator-clear-btn,
.legend--ccs-clear-btn,
.legend--library-clear-btn {
  background-color: #1F497D;
  border-radius: 4px;
  color: #fff;
  padding: 0.8rem;
  width: 100%;
}

.legend--ccs-clear-btn, .legend--library-clear-btn {
  margin: 1rem 0;
  width: 100%;
}

.legend--single-indicator-clear-btn:hover,
.legend--ccs-clear-btn:hover,
.legend--library-clear-btn:hover {
  background-color: #5073a1;
}

.legend--ccs-title-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.legend--ccs-title {
  font-size: 1.5rem;
}

.legend--ccs-indicators {
  overflow: auto;
}

.legend--ccs-btn {
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #666;
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: left;
  width: 100%;
}

.legend--ccs-btn:hover {
  background-color: #ccc;
  color: #000;
}

.legend--ccs-btn-wrapper {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.legend--ccs-btn-wrapper p {
  margin: 0;
}

.legend--ccs-btn-wrapper i {
  color: #666;
  font-size: 1.6rem;
}

.legend--dropdown {
  position: relative;
  margin-bottom: 5px;
}

.legend--dropdown.disabled {
  opacity: .5;
}

.legend--dropdown-title {
  font-size: 15px;
  text-align: center;
  padding: 4px;
  cursor: pointer;
}

.legend--dropdown.disabled .legend--dropdown-title{
  cursor: default;
}

.legend--dropdown-content {
  position: absolute;
  font-size: 15px;
  top: -1px;
  right: -1px;
  width: 250px;
  background-color: white;
  padding-top: 20px;
  padding-bottom: 20px;
  opacity: 1;
  transition: opacity 250ms;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  z-index: 500;
}

.legend--dropdown,
.legend--dropdown-content {
  border: 1px solid #999999;
  border-radius: 4px;
  background-color: white;
}

.legend--dropdown-content--hidden {
  pointer-events: none;
  opacity: 0;
}

.legend--dropdown-item {
  cursor: pointer;
  height: 40px;
  line-height: 40px;
  background-color: white;
  transition: background-color 250ms;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 20px;
  padding-right: 40px;
}

.legend--dropdown-directions {
  margin-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;
}

.legend--dropdown-item--selected,
.legend--dropdown-item:hover {
  background-color: #EEEEEE;
}

.legend--dropdown--hr {
  margin-bottom: 10px;
  width: calc(100% - 40px);
  border: none;
  border-top: 1px solid #CCCCCC;
}

.legend--dropdown-check {
  margin-right: 10px;
  visibility: hidden;
}

.legend--dropdown-item--selected > .legend--dropdown-check {
  visibility: visible;
}

/* Filter */

.legend--swatches-filter {
  position: relative;
}

.legend--filter-wrapper {
  position: absolute;
  left: 15px;
  top: 10px;
  width: 140px;
  height: 15px;
}

.legend--filter-wrapper > * {
  position: absolute;
}

.legend--filter-rect {
  height: 15px;
  background-color: #ccc;
}

.legend--filter-rect.left, .legend--filter-handle.left {
  left: 0;
}

.legend--filter-rect.right, .legend--filter-handle.right {
  right: 0;
}

.legend--filter-handle {
  height: 15px;
}

.filter-line, .filter-circle {
  background-color: #333;
  position: absolute;
  cursor: pointer;
}

.filter-line {
  width: 1px;
  height: 25px;
  top: -10px;
}

.filter-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  bottom: -5px;
  margin-left: -5px;
}

.filter-circle:hover {
  width: 16px;
  height: 16px;
  margin-left: -8px;
}

.filter-label {
  font-style: italic;
  color: #999;
  font-size: 12px;
  margin: 5px 0;
  white-space: nowrap;
}

.filter-label .icon {
  display: none;
  cursor: pointer;
}

.filter-label.filtered {
  font-style: normal;
  color: #333;
}

.filter-label.filtered .icon {
  display: inline;
}

/* Probe */
.map-probe {
  width: 250px;
}

/* Pooling */
.map--tracts,
.map--dots {
  cursor: default;
}

.map--tracts.pooling {
  cursor: url('../img/add.svg'), default;
}

.map--tracts.pooling .map--tract.pool-selected{
  cursor: url('../img/remove.svg'), default;
}

.map--tracts.pooling .map--tract.map--pooled{
  cursor: default;
}

.map--tract.pool-selected,
.map--tract.hover {
  stroke: #333 !important;
  stroke-width: 2px;
  stroke-linejoin: round;
}

.map.multi-pooling,
.map.multi-pooling .map--tract,
.map.multi-pooling .map--tract.pool-selected {
  cursor: url('../img/select-box.svg'), crosshair;
}

.pool--selection-box {
  background-color: rgba(255, 255, 255, 0.25);
  border: 2px solid #219FE2;
  position: absolute;
  z-index: 950;
}

.pool--tooltip {
  background-color: rgba(51, 51, 51, 0.9);
  border-radius: 3px;
  display: none;
  padding: 7px 10px;
  position: absolute;
  white-space: nowrap;
  z-index: 1000;
}

.pool--tooltip.show {
  display: block;
}

.pool--tooltip-text {
  color: #fff;
  margin: 0;
}

.pool--tooltip-tract {
  color: #F68229;
  margin: 0;
}

@media (max-height: 600px) {
  .legend--dropdown-item {
    height: 30px;
    line-height: 30px;
  }

  .legend--title {
    font-size: 1.5rem;
  }

  .legend--subtitle {
    font-size: 1.2rem;
  }

  .legend--nodata {
    margin: 5px 0;
  }
}
