.ged-sales-map {
  /* GED Brand Quick Guide colors */
  --ged-blue: #184579;
  --ged-gold: #d1a21e;
  --ged-orange: #ee7a36;
  --ged-teal: #009999;
  --ged-gray: #808284;
  --ged-dark-gray: #575a5b;
  --ged-text: #173b66;
  --ged-muted: #5c6f84;
  --ged-border: #d8e0e9;
  --ged-unassigned: #d9dee3;
  --ged-east: var(--ged-blue);
  --ged-midwest: var(--ged-gold);
  --ged-south: var(--ged-orange);
  --ged-west: var(--ged-teal);
  position: relative;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  color: var(--ged-text);
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  min-width: 0;
}

.ged-sales-map *,
.ged-sales-map *::before,
.ged-sales-map *::after { box-sizing: border-box; }

.ged-sales-map__header {
  text-align: center;
  margin: 0 auto 12px;
  max-width: 900px;
  padding-inline: clamp(4px, 1.5vw, 14px);
}
.ged-sales-map__title {
  margin: 0 0 6px;
  color: var(--ged-blue);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 700;
}
.ged-sales-map__subtitle {
  margin: 0;
  color: var(--ged-muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.5;
}

.ged-sales-map__stage {
  position: relative;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--ged-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(24, 69, 121, 0.08);
}

/* Keep the native 1200:760 SVG ratio at every viewport width. This avoids
   the distortion caused by fixed/minimum map heights on narrow screens. */
.ged-sales-map__svg-wrap {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1200 / 760;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}
.ged-sales-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: visible;
  touch-action: manipulation;
}

.ged-country-base {
  fill: #edf1f5;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.ged-territory {
  stroke: #fff;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: filter .16s ease, stroke .16s ease, stroke-width .16s ease;
  outline: none;
}
.territory-east { fill: var(--ged-east); }
.territory-midwest { fill: var(--ged-midwest); }
.territory-south { fill: var(--ged-south); }
.territory-west { fill: var(--ged-west); }
.territory-unassigned { fill: var(--ged-unassigned); cursor: default; }

/* Preserve each territory's identifying color on hover/selection. */
.ged-territory[data-rep]:not([data-rep=""]):hover,
.ged-territory[data-rep]:not([data-rep=""]):focus,
.ged-territory.is-active {
  stroke: var(--ged-dark-gray);
  stroke-width: 3;
  filter: brightness(1.08) saturate(1.08) drop-shadow(0 2px 3px rgba(24, 69, 121, .25));
}
.ged-territory:focus-visible {
  stroke: #fff;
  stroke-width: 4;
  filter: drop-shadow(0 0 2px var(--ged-dark-gray)) drop-shadow(0 2px 3px rgba(24, 69, 121, .28));
}

.ged-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  letter-spacing: .2px;
  paint-order: stroke fill;
  stroke-width: 1.5px;
  stroke-linejoin: round;
}
/* Region-specific text treatment keeps state abbreviations legible on both
   dark and light GED brand colors. */
.ged-label.label-east,
.ged-label.label-west {
  fill: #fff;
  stroke: rgba(0, 0, 0, .26);
}
.ged-label.label-midwest,
.ged-label.label-south {
  fill: #28323c;
  stroke: rgba(255, 255, 255, .78);
}
.ged-label-small { font-size: 6.4px; }
.ged-label-canada { font-size: 10px; }
.ged-label-country { font-size: 16px; letter-spacing: 2.4px; }
.ged-label-mexico-state { font-size: 7px; letter-spacing: .2px; }

.ged-sales-tooltip {
  --rep-accent: var(--ged-blue);
  position: absolute;
  z-index: 20;
  width: min(360px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 42px 14px 14px;
  background: rgba(255,255,255,.985);
  border: 1px solid rgba(24,69,121,.18);
  border-top: 6px solid var(--rep-accent);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(10, 42, 75, .22);
  transform: translateZ(0);
}
.ged-sales-tooltip.rep-josh { --rep-accent: var(--ged-east); }
.ged-sales-tooltip.rep-tom { --rep-accent: var(--ged-midwest); }
.ged-sales-tooltip.rep-greg { --rep-accent: var(--ged-south); }
.ged-sales-tooltip.rep-bill { --rep-accent: var(--ged-west); }
.ged-sales-tooltip[hidden] { display: none !important; }
.ged-sales-tooltip__photo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ged-border);
}
.ged-sales-tooltip__content { min-width: 0; }
.ged-sales-tooltip__place {
  margin-bottom: 2px;
  color: var(--ged-dark-gray);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .65px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.ged-sales-tooltip__name {
  color: var(--ged-blue);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.12;
  font-weight: 700;
}
.ged-sales-tooltip__title {
  margin-top: 3px;
  color: var(--ged-muted);
  font-size: 13px;
  line-height: 1.35;
}
.ged-sales-tooltip__phone {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 4px;
  color: var(--ged-blue);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.ged-sales-tooltip__phone:hover,
.ged-sales-tooltip__phone:focus { color: #0e2f57; text-decoration: underline; }
.ged-sales-tooltip__close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ged-dark-gray);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ged-sales-tooltip__close:hover,
.ged-sales-tooltip__close:focus-visible { background: #f0f3f6; outline: 2px solid var(--ged-blue); outline-offset: 1px; }

.ged-sales-map__legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 15px 2px 2px;
  color: var(--ged-text);
  font-size: 13px;
  font-weight: 700;
}
.ged-sales-map__legend span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  line-height: 1.25;
}
.ged-sales-map__legend i {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,.14);
}
.legend-east { background: var(--ged-east); }
.legend-midwest { background: var(--ged-midwest); }
.legend-south { background: var(--ged-south); }
.legend-west { background: var(--ged-west); }

@media (max-width: 980px) {
  .ged-sales-map__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .ged-sales-map__stage { border-radius: 10px; }
  .ged-sales-map__svg-wrap { aspect-ratio: 1200 / 760; }
  .ged-label { font-size: 8px; }
  .ged-label-small { font-size: 5.2px; }
  .ged-label-canada { font-size: 8px; }
  .ged-label-country { font-size: 13px; }
  .ged-label-mexico-state { font-size: 6px; }

  /* On phones the contact card docks below the map rather than covering it. */
  .ged-sales-tooltip {
    position: relative;
    inset: auto !important;
    width: calc(100% - 20px);
    margin: 10px;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px 42px 10px 10px;
    gap: 10px;
    box-shadow: 0 7px 18px rgba(10, 42, 75, .16);
  }
  .ged-sales-tooltip__photo { width: 72px; height: 72px; }
  .ged-sales-tooltip__title { font-size: 12px; }
  .ged-sales-tooltip__phone { font-size: 15px; min-height: 44px; }
  .ged-sales-tooltip__close { width: 38px; height: 38px; }
  .ged-sales-map__legend { grid-template-columns: 1fr; gap: 8px; padding-inline: 4px; }
}

@media (max-width: 390px) {
  .ged-sales-map__title { font-size: 23px; }
  .ged-sales-tooltip { grid-template-columns: 58px minmax(0, 1fr); }
  .ged-sales-tooltip__photo { width: 58px; height: 58px; }
  .ged-sales-tooltip__name { font-size: 17px; }
  .ged-sales-tooltip__place { font-size: 11px; }
}

@media (hover: none) and (pointer: coarse) {
  .ged-territory[data-rep]:not([data-rep=""]):hover { filter: none; stroke-width: 1.35; stroke: #fff; }
  .ged-territory.is-active { stroke: var(--ged-dark-gray); stroke-width: 3; filter: brightness(1.08) saturate(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .ged-territory { transition: none; }
}
