/* ─────────────────────────────────────────
   FORM PRIMITIVES
───────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--ui-control-padding);
}

.form-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--ui-control-padding);
}

.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: var(--ui-control-padding) calc(var(--ui-control-padding) + 2px);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

select.form-control {
  background-image: none;
  height: 40px;
}

input.form-control {
  height: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 72px;
}

.form-toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-size: 0.82rem;
  cursor: pointer;
}

.form-toggle:has(input:disabled) {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.form-toggle + .form-toggle {
  margin-top: 12px;
}

.form-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.form-toggle input:checked + .settings-switch {
  background: rgba(215, 173, 49, 0.22);
  border-color: rgba(215, 173, 49, 0.4);
}

.form-toggle input:disabled + .settings-switch {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.form-toggle input:disabled + .settings-switch::after {
  background: rgba(255, 255, 255, 0.45);
}

.form-toggle input:checked + .settings-switch::after {
  transform: translateX(16px);
  background: var(--accent);
}

.settings-toggle {
  display: grid;
}

.edit-inline-toggle .settings-switch {
  width: 32px;
  height: 18px;
}

.edit-inline-toggle .settings-switch::after {
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
}

.edit-inline-toggle input:checked + .settings-switch::after {
  transform: translateX(14px);
}

/* ─────────────────────────────────────────
   LEGEND / FILTER
───────────────────────────────────────── */
.legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-flat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-group-header {
  display: flex;
  padding: 12px 0px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-panel);
}

.legend-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.legend-group-title:hover .legend-group-collapse,
.legend-group-title:focus-visible .legend-group-collapse,
.legend-group-title:hover h3,
.legend-group-title:focus-visible h3 {
  color: var(--accent);
}

.legend-group-title:focus-visible {
  outline: none;
}

.legend-group h3 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

.legend-group-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.legend-group-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.legend-group-chevron.collapsed {
  transform: rotate(-90deg);
}

.legend-group-toggle {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.legend-group-toggle:hover,
.legend-group-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.legend-group-items-outer {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend-group.collapsed .legend-group-items-outer {
  grid-template-rows: 0fr;
}

.legend-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.legend-item:hover { background: var(--bg-panel2); border-color: var(--border); }
.legend-item.inactive .legend-dot,
.legend-item.inactive .legend-count {
  opacity: 0.35;
}
.legend-item.inactive .legend-label {
  color: var(--text-dim);
}
.legend-item.disabled {
  cursor: not-allowed;
}
.legend-item.disabled .legend-dot,
.legend-item.disabled .legend-count {
  opacity: 0.28;
}
.legend-item.disabled:hover {
  background: transparent;
  border-color: transparent;
}

.legend-dot {
  width: 12px; height: 12px;
  background: var(--category-color);
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-primary);
  flex: 1;
}

.legend-item.disabled .legend-label {
  color: var(--text-dim);
}

.legend-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-panel2);
  padding: 1px 7px;
  border-radius: 10px;
}

.legend-label .icon-asset,
.popup-title-icon .icon-asset {
  width: 24px;
  height: 24px;
}

.legend-label .icon-asset {
  width: 16px;
  height: 16px;
}

.legend-label .icon-asset-mask {
  background: #fff !important;
}

/* ─────────────────────────────────────────
   REGION INFO
───────────────────────────────────────── */
.region-desc-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.region-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: var(--bg-panel2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-transition-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.stat-transition-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.stat-transition-link:hover {
  color: var(--text-primary);
}

/* ─────────────────────────────────────────
   LEAFLET MARKER OVERRIDES
───────────────────────────────────────── */
.poi-div-icon {
  background: transparent !important;
  border: none !important;
}

.custom-marker {
  width: 32px; height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--category-color);
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.custom-marker:hover {
  transform: rotate(-45deg) scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.8);
}
.custom-marker.active-marker {
  transform: rotate(-45deg) scale(1.45);
  border-color: white;
}

.custom-marker.temporary-marker {
  border-style: dashed;
}

.custom-marker.marker-important {
  /* transform: rotate(-45deg) scale(1.35); */
}
.custom-marker.marker-important:hover {
  /* transform: rotate(-45deg) scale(1.45); */
}
.custom-marker.marker-important.active-marker {
  /* transform: rotate(-45deg) scale(1.6); */
}

.custom-marker.marker-environment.marker-important {
  transform: scale(1.6);
}
.custom-marker.marker-environment.marker-important:hover {
  transform: scale(1.65);
}
.custom-marker.marker-environment.marker-important.active-marker {
  transform: scale(1.8);
}

.custom-marker.marker-environment {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  transform: none;
  width: 32px;
  height: 32px;
  filter:
    drop-shadow(-1px  0   0 white)
    drop-shadow( 1px  0   0 white)
    drop-shadow( 0   -1px 0 white)
    drop-shadow( 0    1px 0 white);
}
.custom-marker.marker-environment:hover {
  transform: scale(1.15);
  box-shadow: none;
}
.custom-marker.marker-environment.active-marker {
  transform: scale(1.45);
  border: none;
}
.custom-marker.marker-environment .marker-icon {
  transform: none;
}
.custom-marker.marker-environment .icon-asset {
  width: 28px;
  height: 28px;
}
.custom-marker.marker-environment .icon-asset-mask {
  background: var(--category-color);
}

.custom-marker .marker-icon {
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  font-size: 12px;
}

.custom-marker .icon-asset {
  width: 20px;
  height: 20px;
}

.poi-cluster-icon {
  background: transparent;
  border: none;
}

.poi-cluster-badge {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  background: var(--cluster-color, rgba(215, 173, 49, 0.92));
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  font-size: 0.82rem;
  font-weight: 800;
}

.poi-cluster-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.poi-cluster-badge-icon .icon-asset {
  width: 14px;
  height: 14px;
}

.poi-cluster-badge-count {
  line-height: 1;
}

.region-location-label-icon {
  background: transparent;
  border: none;
  cursor: pointer;
}

.region-location-label {
  font-family: 'Oswald', system-ui, sans-serif;
  font-weight: 500;
  transform: translate(-50%, -50%);
  display: inline-block;
  width: max-content;
  max-width: 180px;
  padding: 0;
  background: transparent;
  border: none;
  color: rgba(58, 58, 58, 0.96);
  font-size: 1.1rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  white-space: normal;
  text-transform: uppercase;
  text-align: center;
  text-shadow:
    -1px -1px 0 rgba(255, 255, 255, 0.95),
    1px -1px 0 rgba(255, 255, 255, 0.95),
    -1px 1px 0 rgba(255, 255, 255, 0.95),
    1px 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 3px rgba(255, 255, 255, 0.65);
  opacity: 0.94;
  cursor: pointer;
}

.region-location-label:hover {
  color: #000;
}

/* Leaflet popup */
.leaflet-popup-pane {
  z-index: 900 !important;
}

.leaflet-marker-pane {
  z-index: 600 !important;
}

.leaflet-popup-content-wrapper {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.leaflet-popup-content {
  margin: 0;
  padding: 12px 16px;
  min-width: 180px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaflet-popup-tip {
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.popup-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.popup-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.popup-title-row .popup-title {
  margin-bottom: 0;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-item-value {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.popup-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.popup-desc {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.poi-info-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--poi-icon-bg, var(--bg-panel2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.poi-info-icon:empty {
  display: none;
}

.poi-info-icon .icon-asset {
  width: 22px;
  height: 22px;
}

.poi-info-icon .icon-asset-mask {
  background: #fff !important;
}

.poi-info-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.poi-list-id {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.poi-info-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dlc-tag {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
}


.poi-info-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.left-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

body:not([data-mode="search"]) .left-search-wrap {
  display: none;
}

.left-search-input-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 380px;
  max-width: 100%;
}

.left-search-input {
  width: 100%;
  height: var(--ui-element-dimension);
  border-radius: var(--ui-border-radius);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  padding: 0 calc(var(--ui-control-padding) * 5.5) 0 calc(var(--ui-control-padding) * 2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.25);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.left-search-input::placeholder { color: var(--text-muted); }
.left-search-input:focus { border-color: var(--accent); }

.left-search-clear {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.left-search-clear[hidden] { display: none; }
.left-search-clear:hover { color: var(--text-primary); background: var(--bg-panel2); }

.left-search-tags-wrap {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.left-search-tags {
  display: flex;
  align-items: center;
  gap: var(--ui-control-padding);
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  padding: 2px 2px 2px 0;
  scrollbar-width: none;
}

.left-search-tags-scroll {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
}

.left-search-tags-scroll[hidden] {
  display: none;
}

.left-search-tags-scroll-left {
  left: 0;
}

.left-search-tags-scroll-right {
  right: 0;
}

.left-search-tags-scroll-right img {
  transform: rotate(180deg);
}

.left-search-tags-scroll img {
  width: 16px;
  height: 16px;
}

.left-search-tags-scroll:hover {
  background: var(--bg-panel2);
}

.left-search-tags::-webkit-scrollbar {
  display: none;
}

.left-search-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.84rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.left-search-tag:hover,
.left-search-tag:focus-visible {
  background: var(--bg-panel2);
  border-color: rgba(215, 173, 49, 0.35);
  color: var(--accent);
  outline: none;
}

.left-search-tag:active {
  transform: translateY(1px);
}

.left-search-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--tag-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.left-search-tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.left-search-tag-icon .icon-asset {
  width: 16px;
  height: 16px;
}

@media (max-width: 1024px) {
  .left-search-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .left-search-tags-wrap {
    width: 100%;
    flex: 0 1 auto;
  }
}

.poi-info-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.poi-info-count[hidden] { display: none; }

.poi-info-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
.poi-info-link:hover { color: var(--accent-hover); text-decoration: underline; }

.popup-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.popup-transition-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.popup-contents-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 8px 16px;
}

#poi-info-content .popup-contents-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.popup-contents-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.popup-contents-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.popup-contents-icon .icon-asset {
  width: 24px;
  height: 24px;
}

.popup-meta-row,
.popup-coordinates {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.popup-mono-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ─────────────────────────────────────────
   EDIT FORM
───────────────────────────────────────── */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edit-field {
  display: flex;
}

.edit-field span {
  display: block;
}

.edit-field select,
.edit-field input,
.edit-field textarea {
  display: block;
}

.edit-field select {
}

.edit-field input {
}

.edit-field textarea {
}

.edit-contents-field {
  gap: 8px;
}

.edit-contents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-contents-row {
  display: flex;
  gap: 16px;
  align-items: center;
  border-radius: 10px;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.edit-contents-row select {
  flex: 1 1 auto;
}

.edit-content-drag {
  width: 16px;
  height: 40px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: color 140ms ease, transform 140ms ease;
}

.edit-content-drag:hover {
  color: var(--text-primary);
}

.edit-content-drag:active {
  cursor: grabbing;
}

.edit-content-drag span {
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: -0.1em;
}

.edit-contents-row.dragging {
  opacity: 0.55;
}

.edit-contents-row.drag-over {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.edit-content-add,
.edit-content-remove {
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.edit-content-add {
  margin-top: 8px;
  align-self: flex-start;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--category-color, #d7ad31) 18%, var(--bg-panel2));
  border: 1px solid color-mix(in srgb, var(--category-color, #d7ad31) 40%, var(--border));
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.edit-content-remove {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, #9d2b2b 18%, var(--bg-panel2));
  border: 1px solid color-mix(in srgb, #9d2b2b 42%, var(--border));
  color: #ffd7d7;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.edit-content-add:hover,
.edit-content-remove:hover,
.edit-delete:hover {
  transform: translateY(-1px);
}

.edit-content-add:hover {
  background: color-mix(in srgb, var(--category-color, #d7ad31) 26%, var(--bg-panel2));
  border-color: color-mix(in srgb, var(--category-color, #d7ad31) 55%, var(--border));
}

.edit-content-remove:hover {
  background: color-mix(in srgb, #b83535 26%, var(--bg-panel2));
  border-color: color-mix(in srgb, #b83535 55%, var(--border));
}

.edit-coords {
  font-size: 0.74rem;
  margin-top: 4px;
  color: var(--text-dim);
}

.edit-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #8f2626 0%, #6d1717 100%);
  border: 1px solid #a42a2a;
  color: #fff1f1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.edit-delete span[aria-hidden="true"] {
  font-size: 1rem;
  line-height: 1;
}

.edit-delete:hover {
  background: linear-gradient(180deg, #a62c2c 0%, #821d1d 100%);
  border-color: #bc3535;
}

.edit-controls {
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.edit-toggle,
.edit-view {
  width: 30px;
  height: 30px;
  background: #fff;
  border: none;
  color: #000;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}

.edit-toggle {
  font-size: 1.2rem;
}

.edit-toggle.active {
  background: var(--accent);
  color: var(--bg-dark);
}

.edit-view.visible {
  display: block;
}

.edit-view {
  display: none;
  width: auto;
  min-width: 78px;
  padding: 0 10px;
  border-left: 1px solid #d1d5db;
}

/* ─────────────────────────────────────────
   LEAFLET ZOOM CONTROL — DARK THEME
───────────────────────────────────────── */
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.45) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-panel) !important;
  border-bottom-color: var(--border) !important;
  color: var(--text-primary) !important;
  font-size: 1.1rem !important;
  line-height: 26px !important;
  width: 52px !important;
  height: 36px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-panel2) !important;
  color: var(--accent) !important;
}

.leaflet-control-zoom-in {
  border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
  border-radius: 0 0 8px 8px !important;
  border-bottom: none !important;
}

/* ─── SEARCH AUTOCOMPLETE ─────────────────── */
.search-suggestions {
  position: fixed;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 700;
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
}

.search-suggestions-header {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: var(--bg-panel2);
}

.search-suggestion-icon-wrap {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-suggestion-inner-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.search-suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.search-suggestion-label {
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-suggestion-count {
  flex-shrink: 0;
  min-width: 1.75rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-panel2);
  padding: 1px 7px;
  border-radius: 10px;
}
