/**
 * TopologyMapView Styles
 */

.TopologyMapView {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--theme-color-bg-2);
  position: relative;
}

.TopologyMapView__controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
  background: var(--theme-color-bg-3);
  border: 1px solid var(--theme-color-border-default);
  border-radius: 6px;
  padding: 8px;
}

.TopologyMapView__button {
  background: var(--theme-color-bg-4);
  border: 1px solid var(--theme-color-border-default);
  border-radius: 4px;
  color: var(--theme-color-fg-default);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  transition: all 0.2s ease;
  min-width: 36px;

  &:hover {
    background: var(--theme-color-bg-5);
    border-color: var(--theme-color-primary);
  }

  &:active {
    transform: scale(0.95);
  }
}

.TopologyMapView__zoom {
  color: var(--theme-color-fg-default-shy);
  font-size: 12px;
  font-weight: 500;
  min-width: 48px;
  text-align: center;
}

.TopologyMapView__svg {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

.TopologyMapView__footer {
  padding: 8px 16px;
  background: var(--theme-color-bg-3);
  border-top: 1px solid var(--theme-color-border-default);
  color: var(--theme-color-fg-default-shy);
  font-size: 12px;
  text-align: center;
}

// Floating Legend
.TopologyMapView__legend {
  position: absolute;
  top: 70px;
  right: 16px;
  background: var(--theme-color-bg-4);
  border: 1px solid var(--theme-color-border-default);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  z-index: 10;
}

.TopologyMapView__legendHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--theme-color-border-default);

  h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color-fg-default);
  }
}

.TopologyMapView__legendClose {
  background: transparent;
  border: none;
  color: var(--theme-color-fg-default-shy);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    color: var(--theme-color-fg-default);
  }
}

.TopologyMapView__legendContent {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.TopologyMapView__legendItem {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--theme-color-fg-default);
}

.TopologyMapView__legendColor {
  width: 24px;
  height: 24px;
  border: 2px solid;
  border-radius: 4px;
  background: var(--theme-color-bg-3);
  flex-shrink: 0;
}

.TopologyMapView__legendBadge {
  width: 24px;
  height: 24px;
  background: var(--theme-color-accent);
  color: var(--theme-color-fg-on-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
