html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

#panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  width: 260px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
}

#panel h1 {
  font-size: 16px;
  margin: 0 0 6px;
}

#panel p {
  font-size: 12px;
  color: #444;
  margin: 0 0 10px;
}

#panel label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

#panel input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 10px;
}

#selected-info {
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
}

#submit-btn {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  background: #2a7f3f;
  color: #fff;
  cursor: pointer;
}

#submit-btn:disabled {
  background: #a9c9b1;
  cursor: not-allowed;
}

#status {
  font-size: 12px;
  margin-top: 8px;
  min-height: 16px;
}

#status.error {
  color: #b00020;
}

#status.ok {
  color: #2a7f3f;
}

#panel h2 {
  font-size: 13px;
  margin: 0 0 6px;
}

#stats {
  font-size: 12px;
  color: #333;
}

#stats ul,
#poi-list ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  max-height: 220px;
  overflow-y: auto;
}

#stats li,
#poi-list li {
  padding: 3px 0;
  border-bottom: 1px solid #eee;
}

#poi-list {
  font-size: 12px;
  color: #333;
}

.poi-item-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #1a5fb4;
  text-decoration: underline;
  cursor: pointer;
}

.poi-type {
  color: #777;
}

#poi-modal {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  padding: 20px;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

#poi-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

#poi-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

#poi-modal-title {
  margin: 0 30px 4px 0;
  font-size: 18px;
}

#poi-modal-type {
  color: #777;
  font-size: 13px;
  margin-bottom: 10px;
}

#poi-modal-image {
  display: none;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

#poi-modal-image.visible {
  display: block;
}

#poi-modal-description {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

#poi-modal-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

#poi-modal-links a {
  color: #1a5fb4;
  font-size: 13px;
}

.pagasts-selected {
  fill: #ffb703 !important;
  fill-opacity: 0.6 !important;
}

.leaflet-interactive:focus {
  outline: none;
}
