/* The minimap uses the Traits panel's thin metal frame over the recruitment board's stone tile. */
#wb-ui #wb-minimap {
  width: clamp(202px, 16vw, 232px);
  border: 7px solid transparent !important;
  border-image: url('./skin/warsworn/trait-panel-frame.png') 16 / 7px stretch !important;
  border-radius: 0;
  background: linear-gradient(#ffffff06, #00000030), var(--wb-kit-stone) 0 0 / 256px 256px repeat, #1b1713 !important;
  background-clip: border-box !important;
  padding: 7px !important;
  overflow: visible;
  box-shadow: 0 4px 14px #0006;
  color: #e9dfcd;
}

#wb-ui #wb-minimap .wb-map-heading {
  min-height: 23px;
  margin: 0 0 8px;
  gap: 7px;
}
#wb-ui #wb-minimap .wb-map-heading strong {
  color: #e7d0a1;
  font: 12px/1.3 WarbandFriz, Georgia, serif !important;
  white-space: nowrap;
  text-shadow: 0 1px 1px #0008;
}
#wb-ui #wb-minimap .wb-map-heading button {
  min-height: 23px !important;
  margin: 0;
  padding: 2px 5px !important;
  border: 4px solid transparent !important;
  border-image: url('./skin/dialogue-ui/brown-option-hollow.png') 16 / 4px stretch !important;
  background: linear-gradient(#393026, #211b16) !important;
  color: #e8d5ae;
  font: 10px/1.2 Arial, sans-serif !important;
  text-shadow: 0 1px 1px #0008;
  box-shadow: none;
}
#wb-ui #wb-minimap .wb-map-heading button:is(:hover, :focus-visible):not(:disabled) {
  background: linear-gradient(#493d2e, #2b221a) !important;
  color: #fff0c9;
  outline: 1px solid #d8bd8666;
  outline-offset: 1px;
}
#wb-ui #wb-minimap .wb-map-heading button:disabled { color: #a09887; }

#wb-ui #wb-minimap #wb-minimap-zones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 1;
  gap: 6px;
  padding: 0;
  background: none;
}
#wb-ui #wb-minimap :is(.wb-map-zone, .wb-map-empty) {
  border-radius: 3px;
  background: #171410 !important;
}
#wb-ui #wb-minimap .wb-map-zone::after {
  border: 1px solid #96826588;
  border-radius: 3px;
  background: linear-gradient(#100d0aba 0, transparent 27%, transparent 52%, #100d0abf 100%);
  transition: border-color 120ms, box-shadow 120ms;
}
#wb-ui #wb-minimap .wb-map-zone:is(:hover, :focus-visible)::after {
  border-color: #e9d5b0;
  box-shadow: inset 0 0 8px #eed7ae22;
}
#wb-ui #wb-minimap .wb-map-zone.wb-map-selected::after {
  border: 2px solid #ded6c4;
  box-shadow: inset 0 0 6px #ede3cf20;
}
/* Your fight keeps its gold border when another arena is selected or hovered. */
#wb-ui #wb-minimap .wb-map-zone.wb-map-own::after {
  border: 2px solid #f3cd63;
  box-shadow: inset 0 0 8px #efc35b44, 0 0 5px #f3cd6326;
}
#wb-ui #wb-minimap .wb-map-zone.wb-map-own:is(:hover, :focus-visible)::after {
  border-color: #ffe395;
  box-shadow: inset 0 0 9px #efc35b55, 0 0 5px #f3cd6333;
}
#wb-ui #wb-minimap .wb-map-ground {
  background-color: #211c16;
  background-blend-mode: normal;
  filter: none;
}
#wb-ui #wb-minimap .wb-map-index {
  top: 6px;
  left: 6px;
  color: #f2e6cc;
  font: 11px/12px Arial, sans-serif !important;
  text-shadow: 0 1px 2px #000;
}
#wb-ui #wb-minimap .wb-map-status {
  top: 6px;
  left: 23px;
  right: 6px;
  color: #d0d8b5;
  font: 10px/12px Arial, sans-serif !important;
  text-shadow: 0 1px 2px #000;
}
#wb-ui #wb-minimap .wb-map-commanders {
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 24px !important;
  min-height: 24px !important;
  gap: 5px;
}
#wb-ui #wb-minimap .wb-map-commanders > span {
  height: 24px !important;
  min-height: 24px !important;
  line-height: 24px;
}
#wb-ui #wb-minimap .wb-map-commanders img {
  width: 24px !important;
  height: 24px !important;
  border: 1px solid #ba9d70;
  border-radius: 2px;
  box-shadow: 0 1px 3px #0009;
}
#wb-ui #wb-minimap .wb-map-winner img { border-color: #b7d29a; }
#wb-ui #wb-minimap .wb-map-winner > span {
  background: #242a1d;
  color: #d1e6b6;
  border: 1px solid #75905d;
  box-sizing: content-box;
}
#wb-ui #wb-minimap .wb-map-empty {
  color: #a69a82;
  font: 13px/1 Arial, sans-serif !important;
  box-shadow: inset 0 0 0 1px #6d5d465c !important;
}
/* Keep real troop dots; obsolete camera and your-arena marker glyphs stay hidden. */
#wb-ui #wb-minimap :is(.wb-map-view, .wb-map-camera, .wb-map-your-key, .wb-map-legend) {
  display: none !important;
}

@media (max-width: 1100px), (max-height: 700px) {
  #wb-ui #wb-minimap { width: 202px; padding: 6px !important; }
  #wb-ui #wb-minimap .wb-map-heading { margin-bottom: 6px; }
  #wb-ui #wb-minimap #wb-minimap-zones { gap: 5px; }
  #wb-ui #wb-minimap .wb-map-commanders,
  #wb-ui #wb-minimap .wb-map-commanders > span { height: 22px !important; min-height: 22px !important; }
  #wb-ui #wb-minimap .wb-map-commanders img { width: 22px !important; height: 22px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #wb-ui #wb-minimap .wb-map-zone::after { transition: none; }
}
