/* Sites map widget — sits between the KPI bar and the filter bar on the
   Fleet Overview page. */

.sitesmap {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sitesmap .sm-head {
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  row-gap: 6px;
}

.sitesmap .sm-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.sitesmap .sm-title > :first-child { color: var(--text-2); }
.sitesmap .sm-region {
  color: var(--text-3);
  letter-spacing: 0.14em;
  margin-left: 4px;
  font-weight: 500;
}
.sitesmap .sm-hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: none;
  margin-left: 8px;
  font-weight: 400;
}

.sitesmap .sm-legend {
  margin-left: auto;
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.sitesmap .sm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sitesmap .sm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.sitesmap .sm-dot.ok    { background: var(--ok); }
.sitesmap .sm-dot.warn  { background: var(--warn); }
.sitesmap .sm-dot.alarm { background: var(--alarm); }
.sitesmap .sm-dot.off   { background: var(--off); }

.sitesmap .sm-wrap {
  background: var(--bg-0);
  padding: 6px 22px 10px;
}

.sitesmap .sm-svg {
  width: 100%;
  height: 280px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-1);
}

/* Pin interactions */
.sitesmap .sm-pin { cursor: pointer; transition: transform 0.15s ease; }
.sitesmap .sm-pin:hover { transform-box: fill-box; }
.sitesmap .sm-pin:hover text:first-of-type,
.sitesmap .sm-pin.active text:first-of-type { fill: var(--accent-2); }
.sitesmap .sm-pin:hover circle:nth-of-type(2) { stroke-width: 2.4; }
.sitesmap .sm-pin.active circle:nth-last-of-type(2) { fill: var(--bg-1); }

/* Clear-filter affordance when a pin is selected (shown inline by app.jsx) */
.sitesmap .sm-active-note {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}
.sitesmap .sm-active-note button {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-0);
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.06em;
}
.sitesmap .sm-active-note button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
