/* Geographic map card — Altum dashboard */
.geo-map-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: var(--surface, #fff);
  width: 100%;
}

.geo-map-card__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.geo-map-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.geo-map-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #111827);
  margin: 0;
}

.geo-region-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.geo-rbtn {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid var(--border, #e5e7eb);
  background: transparent;
  cursor: pointer;
  color: var(--muted, #6b7280);
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  white-space: nowrap;
  font-family: inherit;
}

.geo-rbtn:hover {
  background: var(--surface2, #f3f4f6);
  color: var(--text, #111827);
}

.geo-rbtn--active {
  background: #0f2044;
  color: #fff;
  border-color: #0f2044;
}

.geo-map-frame {
  position: relative;
  width: 100%;
  height: 360px;
  background: #e8f0f7;
  overflow: hidden;
}

.geo-map-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.geo-map-frame svg:active {
  cursor: grabbing;
}

.geo-legend {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: var(--surface, #fff);
  border: 0.5px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  pointer-events: none;
  z-index: 5;
  box-shadow: var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.geo-legend__title {
  font-weight: 500;
  color: var(--text, #111827);
  margin-bottom: 5px;
}

.geo-legend__bar {
  height: 8px;
  width: 130px;
  border-radius: 3px;
  background: linear-gradient(to right, #dbeafe, #0f2044);
}

.geo-legend__labels {
  display: flex;
  justify-content: space-between;
  width: 130px;
  font-size: 10px;
  color: var(--muted, #6b7280);
  margin-top: 3px;
}

.geo-zoom-btns {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.geo-zoom-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface, #fff);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #111827);
  line-height: 1;
  font-family: inherit;
  padding: 0;
}

.geo-zoom-btn:hover {
  background: var(--surface2, #f3f4f6);
}

.geo-tooltip {
  position: absolute;
  background: var(--surface, #fff);
  border: 0.5px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  pointer-events: none;
  display: none;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 220px;
}

.geo-tooltip__name {
  font-weight: 500;
  color: var(--text, #111827);
}

.geo-tooltip__val {
  color: var(--muted, #6b7280);
  margin-top: 2px;
}

.geo-tooltip__cont {
  color: var(--muted2, #9ca3af);
  font-size: 10px;
  margin-top: 1px;
}

.geo-info-bar {
  padding: 8px 16px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 12px;
  color: var(--muted, #6b7280);
  background: var(--surface2, #f9fafb);
  min-height: 34px;
}

.geo-map-frame path.geo-country--selected {
  stroke: #0f2044 !important;
  stroke-width: 1.4px !important;
}

[data-theme="dark"] .geo-map-frame {
  background: #1a2744;
}

[data-theme="dark"] .geo-legend,
[data-theme="dark"] .geo-tooltip,
[data-theme="dark"] .geo-zoom-btn {
  background: var(--surface, #1e293b);
  border-color: var(--border, #334155);
}

[data-theme="dark"] .geo-rbtn--active {
  background: #3b5bdb;
  border-color: #3b5bdb;
}

@media (max-width: 640px) {
  .geo-map-card__title-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .geo-map-frame {
    height: 240px;
  }
  .geo-rbtn {
    font-size: 10px;
    padding: 3px 8px;
  }
}
