/* MRS Allergy inline elm distribution map shortcode */
.mrsa-elm-widget,
.mrsa-elm-widget * ,
.mrsa-elm-widget *::before,
.mrsa-elm-widget *::after {
  box-sizing: border-box;
}

.mrsa-elm-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: transparent;
  color: #1a1a18;
  padding: 2rem 0;
  width: 100%;
}

.mrsa-elm-widget h1 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #1a1a18;
}

.mrsa-elm-widget .subtitle {
  font-size: 13px;
  color: #6b6b67;
  margin: 0 0 1.5rem;
}

.mrsa-elm-widget .controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.mrsa-elm-widget .controls span {
  font-size: 13px;
  color: #6b6b67;
  margin-right: 4px;
}

.mrsa-elm-widget button {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 8px;
  border: 0.5px solid #ccc;
  background: #fff;
  color: #1a1a18;
  cursor: pointer;
}

.mrsa-elm-widget button:hover,
.mrsa-elm-widget button:focus {
  background: #eee;
}

.mrsa-elm-widget button.active-american {
  background: #185FA5;
  color: #fff;
  border-color: transparent;
}

.mrsa-elm-widget button.active-cedar {
  background: #275009;
  color: #fff;
  border-color: transparent;
}

.mrsa-elm-widget button.active-chinese {
  background: #623806;
  color: #fff;
  border-color: transparent;
}

.mrsa-elm-widget #map-container {
  width: 100%;
  max-width: 860px;
  background: #fff;
  border: 0.5px solid #ddd;
  border-radius: 12px;
  padding: 1.25rem;
}

.mrsa-elm-widget svg#elm-map {
  width: 100%;
  height: auto;
  display: block;
}

/* Visible state outlines: blue-gray works on both white and dark fills. */
.mrsa-elm-widget path.state {
  transition: fill 0.28s, stroke 0.15s;
  cursor: pointer;
  stroke: #d7e6f5 !important;
  stroke-width: 1.05 !important;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.mrsa-elm-widget path.state:hover,
.mrsa-elm-widget path.state:focus {
  stroke: #06284b !important;
  stroke-width: 1.8 !important;
}

.mrsa-elm-widget #species-note {
  font-size: 12px;
  color: #6b6b67;
  margin-top: 10px;
  min-height: 16px;
}

.mrsa-elm-widget .legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: #6b6b67;
  flex-wrap: wrap;
}

.mrsa-elm-widget .legend-swatches {
  display: flex;
  gap: 2px;
}

.mrsa-elm-widget .legend-swatches div {
  width: 32px;
  height: 12px;
  border-radius: 2px;
  border: 0.5px solid #ddd;
}

.mrsa-elm-widget #tooltip {
  position: fixed;
  background: #fff;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mrsa-elm-widget #tt-state {
  font-weight: 500;
  color: #1a1a18;
}

.mrsa-elm-widget #tt-val {
  color: #6b6b67;
  margin-top: 2px;
}

.mrsa-elm-widget #elm-data-details {
  margin-top: 18px;
  font-size: 13px;
}

.mrsa-elm-widget #elm-data-details summary {
  cursor: pointer;
  color: #185FA5;
  font-size: 13px;
}

.mrsa-elm-widget #elm-data-table {
  border-collapse: collapse;
  margin-top: 10px;
  width: 100%;
  font-size: 12px;
}

.mrsa-elm-widget #elm-data-table th,
.mrsa-elm-widget #elm-data-table td {
  border: 1px solid #ddd;
  padding: 4px 8px;
  text-align: left;
}

.mrsa-elm-widget #elm-data-table caption {
  text-align: left;
  font-size: 12px;
  color: #6b6b67;
  margin-bottom: 6px;
}

@media (max-width: 767px) {
  .mrsa-elm-widget {
    padding: 1.25rem 0;
  }

  .mrsa-elm-widget #map-container {
    padding: 0.75rem;
    overflow-x: auto;
  }

  .mrsa-elm-widget .legend-swatches div {
    width: 24px;
  }
}
