.lotm-trail-map {
  --lotm-green: #1e5b3a;
  --lotm-border: #d7ddd7;
  margin: 1.75rem 0;
  max-width: 100%;
}

.lotm-filter-panel {
  align-items: end;
  background: #f6f7f4;
  border: 1px solid var(--lotm-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 1.35fr) repeat(3, minmax(120px, 1fr)) auto;
  padding: 14px;
}

.lotm-filter label {
  color: #263129;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 5px;
}

.lotm-filter input,
.lotm-filter select,
.lotm-reset {
  border: 1px solid #9ca79e;
  border-radius: 4px;
  box-sizing: border-box;
  font: inherit;
  height: 42px;
  margin: 0;
  max-width: none;
  width: 100%;
}

.lotm-filter input,
.lotm-filter select {
  background: #ffffff;
  color: #172019;
  padding: 7px 10px;
}

.lotm-quality option:not(:first-child),
.lotm-quality.lotm-rating-selected {
  color: #b47d00;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lotm-quality option:first-child {
  color: #172019;
  font-weight: 400;
  letter-spacing: normal;
}

.lotm-reset {
  background: var(--lotm-green);
  border-color: var(--lotm-green);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 7px 16px;
  width: auto;
}

.lotm-reset:hover,
.lotm-reset:focus-visible {
  background: #15432b;
}

.lotm-map-frame {
  position: relative;
}

.lotm-map {
  background: #eef1ed;
  border: 1px solid var(--lotm-border);
  height: min(650px, 70vh);
  min-height: 480px;
  overflow: hidden;
  width: 100%;
}

.lotm-legend {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 4px;
  bottom: 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  color: #263129;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 7px;
  left: 10px;
  padding: 7px 9px;
  position: absolute;
  z-index: 2;
}

.lotm-legend > span:first-child {
  font-weight: 700;
}

.lotm-legend-item {
  align-items: center;
  display: inline-flex;
  gap: 3px;
}

.lotm-legend-item i {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  display: inline-block;
  height: 11px;
  width: 11px;
}

.lotm-result-count {
  color: #526057;
  font-size: 0.9rem;
  margin: 7px 2px 0;
}

.lotm-popup {
  color: #202720;
  font-family: inherit;
  line-height: 1.45;
  padding: 3px;
}

.lotm-popup h3 {
  color: #163d28;
  font-size: 18px;
  line-height: 1.25;
  margin: 0 22px 7px 0;
}

.lotm-popup p {
  font-size: 13px;
  margin: 0 0 8px;
}

.lotm-popup .lotm-popup-ratings {
  font-weight: 700;
}

.lotm-stars {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 1.05em;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.lotm-stars-filled {
  color: #d09a00;
}

.lotm-stars-empty {
  color: #a8afa9;
}

.lotm-screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.lotm-popup-link {
  background: var(--lotm-green);
  border-radius: 4px;
  color: #ffffff !important;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 3px;
  padding: 7px 10px;
  text-decoration: none !important;
}

.maplibregl-popup-content {
  border-radius: 7px;
  padding: 13px;
}

@media (max-width: 900px) {
  .lotm-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lotm-reset {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .lotm-filter-panel {
    grid-template-columns: 1fr;
  }

  .lotm-map {
    height: 520px;
    min-height: 420px;
  }

  .lotm-legend {
    max-width: calc(100% - 80px);
  }
}
