html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #1f2937;
  background: #f5f7f9;
}

.app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app__toolbar {
  position: relative;
  z-index: 2000;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
}

.app__main {
  position: relative;
  flex: 1;
}

#map {
  position: absolute;
  inset: 0;
}

.status {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.status--visible {
  opacity: 1;
}

.status--error {
  background: rgba(153, 27, 27, 0.95);
  opacity: 1;
}

.map-search {
  position: relative;
  z-index: 2100;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 520px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}


.map-search input {
  flex: 1 1 220px;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #111827;
  padding: 0 6px;
}

.map-search button {
  border: none;
  background: #dc2626;
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.map-search button:hover {
  background: #b91c1c;
}

.map-search button:focus-visible,
.map-search input:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.4);
  outline-offset: 2px;
}

.map-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
  z-index: 1150;
}

.map-search-results__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-search-results__item {
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.map-search-results__item:last-child {
  border-bottom: none;
}

.map-search-results__item:hover,
.map-search-results__item:focus-visible {
  background: rgba(254, 205, 211, 0.9);
  color: #991b1b;
}

.map-search-results__item strong {
  display: inline-block;
  color: #b91c1c;
}

.popup {
  max-width: 340px;
  font-size: 13px;
}

.popup-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.popup-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e60000;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

.popup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.popup-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #4b5563;
}

.popup-repeat {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(230, 0, 0, 0.08);
  color: #b91c1c;
  font-weight: 600;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.popup-row:last-child {
  border-bottom: none;
}

.feature-id-tooltip {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.feature-id-tooltip:before {
  border-top-color: rgba(255, 255, 255, 0.95);
}

.popup-key {
  color: #6b7280;
  font-weight: 600;
}

.popup-value {
  color: #111827;
  text-align: right;
  max-width: 180px;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .app__toolbar {
    padding: 10px 12px;
  }

  .map-search {
    width: 100%;
  }

  .map-search input {
    min-width: 0;
  }
}
