.wm-popup {
  --wm-popup-bg: var(--wm-color-popup-bg);
  --wm-popup-panel: var(--wm-color-popup-panel);
  --wm-popup-border: var(--wm-color-popup-border);
  --wm-popup-text: var(--wm-color-popup-text);
  --wm-popup-muted: var(--wm-color-popup-muted);
  --wm-popup-accent: var(--wm-color-popup-accent);
  --wm-popup-surface-opacity: 0.9;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  font-family: var(--wm-font-family, var(--bs-body-font-family, inherit));
  width: min(440px, 92vw);
  min-width: 300px;
  max-height: min(72vh, 560px);
  color: var(--wm-popup-text);
  background: transparent;
  border: 1px solid var(--wm-popup-border);
  border-radius: var(--wm-radius-lg, 0.8rem);
  overflow: hidden;
}
.wm-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--wm-color-surface-dark-600) 0%, var(--wm-popup-bg) 100%);
  opacity: var(--wm-popup-surface-opacity);
  z-index: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.wm-popup__header, .wm-popup__tabs, .wm-popup__footer {
  position: sticky;
  z-index: 2;
  background: transparent;
}
.wm-popup__header {
  top: 0;
  padding: var(--wm-space-sm, 0.35rem) var(--wm-space-md, 0.8rem);
  border-bottom: 1px solid var(--wm-popup-border);
}
.wm-popup__tabs {
  top: 115px;
  padding: 0 var(--wm-space-md, 0.8rem);
  border-bottom: 1px solid var(--wm-popup-border);
}
.wm-popup__tabs ul {
  min-height: 33px;
}
.wm-popup__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  padding: var(--wm-space-md, 0.8rem);
  padding-bottom: calc(var(--wm-space-md, 0.8rem) + 4rem);
  scroll-padding-bottom: 4rem;
}
.wm-popup__footer {
  bottom: 0;
  padding: 0.55rem var(--wm-space-md, 0.8rem);
  border-top: 1px solid var(--wm-popup-border);
}

.wm-popup[data-entity-type=npc] .wm-popup-header__icon {
  color: var(--wm-color-warning-light);
}

.leaflet-popup-content-wrapper .wm-popup {
  font-family: var(--wm-font-family, var(--bs-body-font-family, inherit));
  color: var(--wm-popup-text);
  background: transparent;
}

.leaflet-popup.wm-popup-host .leaflet-popup-content {
  width: auto !important;
  margin: 0;
}

.leaflet-popup-content-wrapper.wm-popup-host {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.leaflet-popup-content-wrapper.wm-popup-loading-host {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.leaflet-popup-tip.wm-popup-host,
.leaflet-popup-tip.wm-popup-loading-host {
  opacity: var(--wm-popup-surface-opacity);
  background: var(--wm-color-popup-panel);
}

.leaflet-popup.wm-popup-host .leaflet-popup-close-button {
  display: none;
}

.leaflet-popup.wm-popup-host .leaflet-popup-close-button:hover,
.leaflet-popup.wm-popup-host .leaflet-popup-close-button:focus {
  color: var(--wm-color-popup-text);
}

.wm-popup-loading {
  margin: -13px -19px;
  min-width: 300px;
  min-height: 56px;
  padding: 0.85rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--wm-color-popup-text, #e9f2fb);
  font-family: var(--wm-font-family, var(--bs-body-font-family, inherit));
  background: linear-gradient(180deg, #161e26 0%, var(--wm-color-popup-bg, #141b22) 100%);
  border: 1px solid var(--wm-color-popup-border, #2c3a49);
  border-radius: var(--wm-radius-lg, 0.8rem);
}

.wm-popup-header {
  display: grid;
  grid-template-columns: minmax(1.2rem, auto) minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.65rem;
  align-items: start;
  width: 100%;
}
.wm-popup-header .dropdown-divider {
  border-color: var(--wm-overlay-white-06);
}
.wm-popup-header__icon {
  grid-column: 1;
  grid-row: 1;
  flex: 0 0 auto;
  font-size: 1.25rem;
  color: var(--wm-popup-accent);
  line-height: 1;
  padding-top: 0.2rem;
}
.wm-popup-header__titles {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.wm-popup-header__vitals-container {
  grid-column: 1/-1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  width: 100%;
}
.wm-popup-header__controls {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}
.wm-popup-header__admin-id {
  color: var(--wm-popup-muted);
  font-size: 0.72rem;
  line-height: 1;
  margin-right: 0.1rem;
}
.wm-popup-header__buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.wm-popup-header__combat-opacity {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--wm-popup-border);
  border-radius: 6px;
  background: var(--wm-overlay-black-15);
  color: var(--wm-popup-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.wm-popup-header__combat-opacity:hover, .wm-popup-header__combat-opacity:focus-visible, .wm-popup-header__combat-opacity.is-active {
  color: var(--wm-popup-text);
  border-color: var(--wm-popup-accent);
  background: var(--wm-overlay-accent-12);
}
.wm-popup-header__icon {
  font-size: 1.25rem;
  color: var(--wm-popup-accent);
  line-height: 1;
  padding-top: 0.2rem;
}
.wm-popup-header__titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.wm-popup-header__title-wrap {
  min-width: 0;
}
.wm-popup-header__title {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.5rem 0.25rem 0.5rem 0;
  margin: -0.35rem -0.6rem -0.35rem 0;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  text-align: left;
  cursor: default;
  border-radius: 4px;
}
.wm-popup-header__title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  min-width: 0;
}
.wm-popup-header__title.is-editable {
  cursor: pointer;
}
.wm-popup-header__title-edit-icon {
  opacity: 0;
  font-size: 0.72rem;
  color: var(--wm-popup-muted);
  transition: opacity 120ms ease;
}
.wm-popup-header__title.is-editable:hover .wm-popup-header__title-edit-icon, .wm-popup-header__title.is-editable:focus-visible .wm-popup-header__title-edit-icon {
  opacity: 1;
}
.wm-popup-header__rename {
  margin-top: 0.2rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.3rem;
  align-items: center;
}
.wm-popup-header__rename-input {
  min-width: 0;
  height: 1.9rem;
  border-radius: var(--wm-radius-md, 0.45rem);
  border: 1px solid var(--wm-popup-border);
  background: var(--wm-overlay-black-15);
  color: var(--wm-popup-text);
  padding: 0 0.55rem;
  font-size: 0.82rem;
  outline: none;
}
.wm-popup-header__rename-input:focus {
  border-color: var(--wm-popup-accent);
}
.wm-popup-header__rename-btn {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: var(--wm-radius-md, 0.45rem);
  border: 1px solid var(--wm-popup-border);
  background: var(--wm-overlay-black-15);
  color: var(--wm-popup-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wm-popup-header__rename-btn--save {
  color: var(--wm-color-success-pale);
}
.wm-popup-header__rename-btn--cancel {
  color: var(--wm-color-warning-pale);
}
.wm-popup-header__subtitle {
  color: var(--wm-popup-muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.wm-popup-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.08rem;
}
.wm-popup-header__xp {
  margin-top: 0.35rem;
}
.wm-popup-header__xp-label {
  display: block;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--wm-popup-muted);
  margin-bottom: 0.18rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.wm-popup-header__xp-track {
  height: 0.24rem;
  border-radius: 999px;
  background: var(--wm-color-black);
  box-shadow: inset 0 1px 0 var(--wm-overlay-white-06);
  overflow: hidden;
}
.wm-popup-header__xp-fill {
  height: 100%;
  background: var(--wm-gradient-xp);
  transition: width 350ms ease-out;
}
.wm-popup-header__vitals-container {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  width: 100%;
}
.wm-popup-header__vital {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.wm-popup-header__vital-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}
.wm-popup-header__vital-label {
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.wm-popup-header__vital-range {
  font-size: 0.68rem;
  color: var(--wm-popup-muted);
  font-weight: 700;
  white-space: nowrap;
}
.wm-popup-header__vital-track {
  height: 0.3rem;
  border-radius: 999px;
  background: var(--wm-color-black);
  box-shadow: inset 0 0 9px var(--wm-overlay-white-20), inset 0 0 5px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}
.wm-popup-header__vital-fill {
  height: 100%;
  transition: width 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.wm-popup-header__vital--health {
  --vital-color: var(--wm-color-danger-light, #e25252);
}
.wm-popup-header__vital--health .wm-popup-header__vital-label {
  color: var(--vital-color);
}
.wm-popup-header__vital--health .wm-popup-header__vital-fill {
  background: linear-gradient(90deg, #d84545 0%, #ff6b6b 50%, #ffb1b1 100%);
  box-shadow: 0 0 0.6rem rgba(255, 107, 107, 0.4);
}
.wm-popup-header__vital--energy {
  --vital-color: var(--wm-color-info-light, #2396b6);
}
.wm-popup-header__vital--energy .wm-popup-header__vital-label {
  color: var(--vital-color);
}
.wm-popup-header__vital--energy .wm-popup-header__vital-fill {
  background: linear-gradient(90deg, #1a7fa8 0%, #2ba8d0 50%, #5cd6f4 100%);
  box-shadow: 0 0 0.6rem rgba(92, 214, 244, 0.4);
}
.wm-popup-header__vital--xp {
  --vital-color: var(--wm-color-success-light, #9de8c4);
}
.wm-popup-header__vital--xp .wm-popup-header__vital-label {
  color: var(--vital-color);
}
.wm-popup-header__vital--xp .wm-popup-header__vital-fill {
  background: linear-gradient(90deg, #6bb89e 0%, #9de8c4 50%, #c8f2e0 100%);
  box-shadow: 0 0 0.6rem rgba(157, 232, 196, 0.4);
}
.wm-popup-header__close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--wm-popup-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  align-self: start;
  justify-self: end;
  margin: 0;
  cursor: pointer;
  position: static;
  flex-shrink: 0;
}
.wm-popup-header__close:hover, .wm-popup-header__close:focus-visible {
  color: var(--wm-popup-text);
  background: var(--wm-overlay-white-06);
}
.wm-popup-header__edit {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid var(--wm-popup-border);
  color: var(--wm-color-warning-pale);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-right: 0;
  flex-shrink: 0;
}
.wm-popup-header__edit:hover, .wm-popup-header__edit:focus-visible {
  color: var(--wm-color-warning-pale-hover);
  border-color: var(--wm-color-warning-pale);
  background: var(--wm-overlay-warning-25);
}
.wm-popup-header__edit.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.wm-popup-header__settings-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem !important;
  color: var(--wm-color-warning-pale) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}
.wm-popup-header__settings-edit:hover, .wm-popup-header__settings-edit:focus {
  color: var(--wm-color-warning-pale-hover) !important;
  background: var(--wm-overlay-warning-25) !important;
}
.wm-popup-header__settings-edit.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.wm-popup-header__settings-edit .wm-popup-header__admin-id {
  margin-left: auto;
  font-size: 0.65rem;
}
.wm-popup-header__settings {
  position: relative;
  flex-shrink: 0;
}
.wm-popup-header__settings-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid var(--wm-popup-border);
  color: var(--wm-popup-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  background: transparent;
  margin: 0;
  flex-shrink: 0;
}
.wm-popup-header__settings-btn:hover, .wm-popup-header__settings-btn:focus-visible {
  color: var(--wm-popup-text);
  border-color: var(--wm-popup-accent);
  background: var(--wm-overlay-accent-12);
}
.wm-popup-header__settings-btn[aria-expanded=true] {
  color: var(--wm-popup-text);
  border-color: var(--wm-popup-accent);
  background: var(--wm-overlay-accent-12);
}
.wm-popup-header__settings-menu {
  background: var(--wm-color-surface-dark-700, #1a1a1a);
  border: 1px solid var(--wm-popup-border);
  border-radius: var(--wm-radius-md, 0.45rem);
  padding: var(--wm-space-sm, 0.35rem) 0;
  min-width: 10rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  position: absolute !important;
  z-index: 50 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
.wm-popup-header__settings-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--wm-space-sm, 0.35rem) var(--wm-space-md, 0.8rem);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: auto;
  color: var(--wm-color-text-primary);
}
.wm-popup-header__settings-item:hover {
  background: var(--wm-overlay-white-04);
}
.wm-popup-header__settings-item .form-check-input {
  margin: 0;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  pointer-events: auto !important;
  accent-color: var(--wm-color-accent-primary);
  flex-shrink: 0;
}
.wm-popup-header__settings-item .form-check-input:checked {
  background-color: var(--wm-color-accent-primary);
  border-color: var(--wm-color-accent-primary);
}
.wm-popup-header__settings-item .form-check-input:focus {
  border-color: var(--wm-color-accent-primary);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--wm-color-accent-primary) 30%, transparent);
}
.wm-popup-header__settings-item .form-check-label {
  flex: 1;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  pointer-events: auto;
  color: var(--wm-color-text-primary);
}

.wm-tabs {
  display: flex !important;
  border-bottom: 0;
  gap: 0.5rem;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
}
.wm-tabs::-webkit-scrollbar {
  display: none;
}
.wm-tabs .nav-item {
  flex: 0 0 auto;
  margin: 0;
}
.wm-tabs .nav-link {
  color: var(--wm-popup-muted);
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: rgba(11, 20, 33, 0.45) !important;
  padding: 0.3rem;
  min-height: 2.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
  white-space: nowrap;
  min-width: -moz-fit-content;
  min-width: fit-content;
  font-weight: 600;
}
.wm-tabs .wm-tab-count {
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.9;
}
.wm-tabs .nav-link.active {
  color: var(--wm-popup-text);
  font-weight: 800;
  text-shadow: none;
  border-color: var(--wm-popup-accent);
  border-bottom: 3px solid #007bff;
  background: rgba(20, 45, 72, 0.72) !important;
  box-shadow: inset 0 0 0 1px var(--wm-overlay-accent-45);
}
.wm-tabs [data-bs-target*=combat].nav-link {
  color: #d07c5c;
  border-color: rgba(208, 124, 92, 0.5);
  background: rgba(208, 124, 92, 0.12) !important;
  font-weight: 700;
}
.wm-tabs [data-bs-target*=combat].nav-link:hover,
.wm-tabs [data-bs-target*=combat].nav-link:focus {
  color: #e89070;
  border-color: rgba(232, 144, 112, 0.7);
  background: rgba(232, 144, 112, 0.2) !important;
}
.wm-tabs [data-bs-target*=combat].nav-link.active {
  color: #ff9d78;
  border-bottom-color: #e89070;
  background: rgba(232, 144, 112, 0.28) !important;
  box-shadow: inset 0 0 0 1px rgba(232, 144, 112, 0.5), 0 0 0.8rem rgba(232, 144, 112, 0.2);
}
.wm-tabs .nav-link:hover,
.wm-tabs .nav-link:focus {
  color: var(--wm-popup-text);
  border-color: var(--wm-overlay-accent-60);
  background: rgba(18, 31, 47, 0.64) !important;
}
.wm-tabs .nav-link.is-contextual {
  color: var(--wm-color-info-pale);
  border-bottom-color: var(--wm-overlay-info-35);
}
.wm-tabs .nav-link.is-contextual.active {
  color: var(--wm-color-info-light);
  border-bottom-color: var(--wm-color-info-light);
}
.wm-tabs .nav-link.is-disabled,
.wm-tabs .nav-link:disabled {
  opacity: 0.45;
  pointer-events: none;
  border-bottom-color: transparent;
}

.wm-badge {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  border: 1px solid var(--wm-popup-border);
  border-radius: var(--wm-radius-md, 0.45rem);
  padding: var(--wm-space-xs, 0.1rem) 0.45rem;
  font-size: 0.68rem;
  text-transform: uppercase;
}
.wm-badge--danger {
  color: var(--wm-color-danger-light);
}
.wm-badge--warning {
  color: var(--wm-color-warning-light);
}
.wm-badge--success {
  color: var(--wm-color-success-light);
}
.wm-badge--secondary {
  color: var(--wm-popup-muted);
}
.wm-badge--info, .wm-badge--primary {
  color: var(--wm-color-info-light);
}

.wm-bar {
  margin-bottom: 0.3rem;
}

.wm-bar__label {
  color: var(--wm-popup-muted);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.wm-bar__range {
  color: var(--wm-popup-muted);
  font-size: 0.72rem;
  margin-left: 0.4rem;
  text-transform: none;
}

.wm-bar__track {
  height: 0.42rem;
  border-radius: 999px;
  background: var(--wm-color-panel-dark);
  margin-bottom: 3px;
  overflow: hidden;
}

.wm-bar__track--danger {
  background: var(--wm-color-danger-bg);
}

.wm-bar__track--info,
.wm-bar__track--primary {
  background: var(--wm-color-info-bg);
}

.wm-bar__fill {
  height: 100%;
  transition: width 350ms ease-out;
}

.wm-bar__fill--danger {
  background: var(--wm-gradient-danger);
}

.wm-bar__fill--info,
.wm-bar__fill--primary {
  background: var(--wm-gradient-info);
}

.wm-bar__fill--warning {
  background: var(--wm-gradient-warning);
}

.wm-bar__fill--success {
  background: var(--wm-gradient-success);
}

.wm-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.wm-stat {
  border: 1px solid var(--wm-popup-border);
  border-radius: var(--wm-radius-md, 0.45rem);
  padding: 0.45rem 0.6rem;
  background: var(--wm-overlay-black-15);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.wm-stat--span-2 {
  grid-column: span 2;
}

.wm-stat--mono .wm-stat__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.84rem;
}

.wm-stat--destination .wm-stat__value {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-stat__label {
  color: var(--wm-popup-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.wm-stat__value {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  text-align: right;
}

.wm-inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.wm-transport-section__block {
  display: grid;
  gap: 0.5rem;
  min-height: 0;
}
.wm-transport-section__list {
  max-height: clamp(120px, 24vh, 220px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.wm-slot {
  min-height: 40px;
  border-radius: var(--wm-radius-md, 0.45rem);
  border: 1px dashed var(--wm-popup-border);
  background: var(--wm-overlay-black-12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main qty" "actions actions";
  align-items: start;
  padding: 0.42rem 0.6rem;
  -moz-column-gap: 0.6rem;
       column-gap: 0.6rem;
  row-gap: 0.5rem;
  width: 100%;
  text-align: left;
}
.wm-slot--filled {
  border-style: solid;
}
.wm-slot[data-airdrop-collector] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}
.wm-slot[data-airdrop-collector].is-selected {
  border-color: var(--wm-popup-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wm-popup-accent) 50%, transparent);
  background: color-mix(in srgb, var(--wm-popup-accent) 12%, var(--wm-overlay-black-12));
  transform: translateY(-1px);
}
.wm-slot__main {
  grid-area: main;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.wm-slot__icon {
  color: var(--wm-popup-accent);
}
.wm-slot__name {
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wm-slot__qty {
  grid-area: qty;
  align-self: start;
  color: var(--wm-popup-muted);
  font-size: 0.72rem;
  text-align: right;
  white-space: nowrap;
}
.wm-slot__action-inline {
  grid-area: qty;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
}
.wm-slot__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0;
}
.wm-slot__actions .btn {
  flex: 1 1 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  white-space: nowrap;
}
.wm-slot__actions .btn i {
  margin-right: 0;
}
.wm-slot__actions .wm-slot-action--icon-only {
  flex: 0 0 auto;
  min-width: 2.2rem;
  width: 2.2rem;
  padding: 0;
  border-radius: 999px;
}

.wm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}
.wm-actions--split {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.wm-actions--tactical-only {
  grid-template-columns: auto;
  justify-content: end;
}
.wm-actions__group {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.wm-actions__group--general {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.wm-actions__group--general::-webkit-scrollbar {
  display: none;
}
.wm-actions__group--tactical {
  flex: 0 0 auto;
  justify-self: end;
  padding-left: 0.55rem;
  border-left: 1px solid var(--wm-popup-border);
}

.wm-actions--split .wm-actions__group--general {
  justify-self: stretch;
}

.wm-actions__item--destructive {
  margin-left: auto;
}

.wm-actions--split .wm-actions__group--tactical {
  justify-self: end;
  padding-left: 0;
  padding-top: 0.45rem;
  border-left: 0;
  border-top: 1px solid var(--wm-popup-border);
}

.wm-action,
.leaflet-container a.wm-action {
  color: var(--wm-popup-text);
  width: 1.95rem;
  height: 1.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wm-radius-md, 0.45rem);
  border: 1px solid var(--wm-popup-border);
  background: var(--wm-overlay-black-15);
  box-shadow: inset 0 1px 0 var(--wm-overlay-white-04);
  text-decoration: none;
  padding: 0.2rem;
  line-height: 1;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.wm-action:hover, .wm-action:focus,
.leaflet-container a.wm-action:hover,
.leaflet-container a.wm-action:focus {
  color: var(--wm-color-text-primary);
  border-color: var(--wm-popup-accent);
  background: var(--wm-overlay-white-06);
  box-shadow: 0 0 0 1px var(--wm-overlay-accent-18), inset 0 1px 0 var(--wm-overlay-white-06);
}
.wm-action.is-disabled,
.leaflet-container a.wm-action.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.wm-action--danger,
.leaflet-container a.wm-action--danger {
  color: var(--wm-color-danger-pale);
  border-color: var(--wm-color-danger-bg);
  background: rgba(180, 28, 46, 0.2);
}
.wm-action--attack,
.leaflet-container a.wm-action--attack {
  color: #ff8f9e;
  border-color: rgba(130, 24, 36, 0.75);
  background: rgba(86, 15, 27, 0.45);
}
.wm-action--warning,
.leaflet-container a.wm-action--warning {
  color: var(--wm-color-warning-pale);
}
.wm-action--success,
.leaflet-container a.wm-action--success {
  color: var(--wm-color-success-pale);
}
.wm-action--info, .wm-action--primary,
.leaflet-container a.wm-action--info,
.leaflet-container a.wm-action--primary {
  color: var(--wm-color-info-pale);
}

.wm-action:active,
.leaflet-container a.wm-action:active {
  transform: translateY(1px);
}

.wm-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
}

.wm-bars .wm-bar {
  margin: 0;
}

.wm-popup[data-entity-type=npc] .tab-pane .wm-bars:first-child {
  padding-top: 0.25rem;
}

@media (max-width: 575.98px) {
  .wm-popup-header {
    gap: 0.5rem;
  }
  .wm-bars {
    grid-template-columns: 1fr;
  }
  .wm-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .wm-actions--split {
    grid-template-columns: minmax(0, 1fr);
  }
  .wm-actions__group {
    flex-wrap: nowrap;
  }
  .wm-actions__group--tactical {
    padding-left: 0.45rem;
  }
  .wm-actions--split .wm-actions__group--tactical {
    padding-left: 0;
  }
  .wm-quick-stats {
    grid-template-columns: 1fr;
  }
}
.wm-popup[data-entity-type=unit] .wm-popup-header__rename {
  display: none !important;
}

.wm-popup .wm-popup-header__title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex-wrap: nowrap !important;
}

.wm-popup .wm-popup-header__title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
  padding: 0.35rem 0 0.35rem 0 !important;
}

.wm-popup .wm-popup-header__title + .wm-popup-header__title-edit {
  align-self: center !important;
  margin-left: 0.5rem !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
}

.wm-popup .wm-popup-header__title-edit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  vertical-align: middle !important;
  position: relative !important;
  top: 0 !important;
  z-index: 3 !important;
  min-width: 1.6rem !important;
  height: 1.6rem !important;
}

.wm-popup .wm-popup-header__title-edit.btn.btn-link,
.wm-popup .wm-popup-header__title-edit.btn-link,
.wm-popup .wm-popup-header__title-edit.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  margin-left: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
  min-width: 2rem !important;
  height: 2rem !important;
}

.wm-popup .wm-popup-header__title-edit .wm-popup-header__title-edit-icon {
  opacity: 1 !important;
  color: var(--wm-popup-accent) !important;
  font-size: 0.9rem !important;
}

.wm-popup .wm-popup-header__title-edit,
.wm-popup .wm-popup-header__title-edit * {
  transform: none !important;
}

/* Fallback: some popups render outside the usual .wm-popup container
   (map panel, offcanvas, or transformed layers). Ensure the pencil
   icon remains visible and aligned even when the ancestor context
   is different in certain environments. Scoped to the edit button
   to avoid affecting other icons. */
.wm-popup-header__title-edit .wm-popup-header__title-edit-icon,
.wm-popup-header__title-edit.btn .wm-popup-header__title-edit-icon {
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  color: var(--wm-popup-accent) !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
}

/* Fallback flex layout for title + edit button when popup is rendered in
   different contexts (map panel, offcanvas, etc). Prevent the button from
   wrapping below the title by making the title flex-grow and the button
   flex-shrink:0. */
.wm-popup-header__title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: nowrap !important;
}

.wm-popup-header__title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.wm-popup-header__title-edit,
.wm-popup-header__title-edit.btn,
.wm-popup-header__title-edit.btn-link {
  flex: 0 0 auto !important;
  align-self: center !important;
  margin-left: 0.5rem !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wm-popup-header__title,
.wm-popup-header__title-text {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  cursor: grab !important;
}

/*# sourceMappingURL=wm-popup.css.map */