/* Route map on /unsere-route/ (layouts/shortcodes/route-map.html,
   static/js/route-map.js). Only that page loads this file. */

.route-map-wrap {
  margin: 0 0 32px;
}

.route-map {
  height: 420px;
  border-radius: 6px;
  /* The sea: the map has no tiles, only land drawn on top of this. */
  background: #cfe3ec;
  z-index: 0;
}

@media (min-width: 768px) {
  .route-map {
    height: 520px;
  }
}

.route-map-noscript {
  padding: 16px;
  margin: 0;
}

/* The theme's `.post-container img` rule (max-width, margins) would bend
   Leaflet's internal images and the popup thumbnails out of shape. */
.post-container .route-map img {
  max-width: none;
  margin: 0;
}

.route-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.route-filter-btn {
  --trip-color: #404040;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
  color: #404040;
  cursor: pointer;
}

.route-filter-btn::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--trip-color);
}

.route-filter-btn:hover {
  border-color: var(--trip-color);
}

.route-filter-btn[aria-pressed="true"] {
  background: var(--trip-color);
  border-color: var(--trip-color);
  color: #fff;
}

.route-filter-btn[aria-pressed="true"]::before {
  background: #fff;
}

/* Scoped by .post-container to outrank the theme's .post-container ul
   (40px below, and indented on phones); the popup lists below likewise. */
.post-container .route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #808080;
}

.route-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.route-legend-line {
  width: 26px;
  border-top: 2.5px solid #808080;
}

.route-legend-flug {
  border-top-style: dashed;
}

.route-legend-boot {
  border-top-style: dotted;
}

.route-legend-here {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0085a1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #0085a1;
}

/* "Wir sind gerade hier": a dot with a ring pulsing outwards. */
.route-here {
  border-radius: 50%;
  background: #0085a1;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.route-here::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #0085a1;
  animation: route-here-pulse 2s ease-out infinite;
}

@keyframes route-here-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .route-here::after {
    animation: none;
  }
}

.route-popup {
  font-size: 13px;
  line-height: 1.45;
}

.route-popup strong {
  font-size: 15px;
}

.route-popup-meta,
.route-popup-how {
  color: #808080;
}

.route-popup .route-popup-visits,
.route-popup .route-popup-posts {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.route-popup-visits li + li {
  margin-top: 4px;
}

.route-popup .route-popup-posts {
  border-top: 1px solid #eee;
  padding-top: 6px;
}

.route-popup-posts li + li {
  margin-top: 6px;
}

.route-popup-posts a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.route-popup-posts img {
  flex: none;
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  background: #eee;
}
