.control-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #e8eaed;
  padding: 10px 16px;
  border-radius: 4px;
  flex-wrap: wrap;
}
.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.control-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  margin: 0;
}
.control-group .form-group {
  margin-bottom: 0;
}
.control-group select,
.control-group input[type='number'] {
  height: 32px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  color: #333;
}
.control-group select {
  min-width: 110px;
}
.control-group input[type='number'] {
  width: 80px;
}
.search-btn {
  background-color: #4a7c59 !important;
  border-color: #4a7c59 !important;
  color: white !important;
  height: 32px;
  padding: 4px 14px;
  font-size: 13px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-btn:hover {
  background-color: #3a6347 !important;
}

.control-group-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ___Figure area */
.figure-area {
  display: flex;
  flex-direction: row;
  flex: 1;            
  min-height: 0;     
  overflow: hidden;
}


.png-figure-area {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.png-figure-area img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Map selector area ───────────────────────────── */
.choice-map-area {
  flex: 0 0 35%;
  height: 100%;
  position: relative;
  border-left: 1px solid #ddd;
  background: #f9f9f9;
  overflow: hidden;
}

/* SVG paths */
.map-feature {
  fill: #c8dff5;
  stroke: #fff;
  stroke-width: 0.6px;
  cursor: pointer;
  transition: fill 0.15s ease;
}

.map-feature.hovered {
  fill: #7ab3e0;
}

.map-feature.selected {
  fill: #1a6fba;
  stroke: #fff;
  stroke-width: 1.5px;
}

/* Breadcrumb */
.map-breadcrumb {
  height: 26px;
  line-height: 26px;
  padding: 0 8px;
  font-size: 12px;
  background: #eef2f7;
  border-bottom: 1px solid #dde;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-item { color: #333; }
.bc-link  { color: #1a6fba; cursor: pointer; text-decoration: underline; }
.bc-sep   { margin: 0 4px; color: #999; }
.bc-current { font-weight: 600; }

/* Reset button */
.map-reset-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #4a7c59;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
}

.map-reset-btn:hover { background: #3a6347; }

/* Hover tooltip */
.map-tooltip {
  position: absolute;
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;       /* never blocks mouse events */
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.legend-table-area > .shiny-html-output {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}