/* GPX map POI – mimo @layer, aby styly fungovaly nad Leaflet vrstvami */

.leaflet-pane.gpxPoiPane-pane {
  z-index: 620 !important;
}

.gpx-poi-leaflet-icon {
  background: transparent !important;
  border: none !important;
}

.gpx-poi-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
  transition: transform 0.12s ease;
}

.leaflet-marker-icon.gpx-poi-leaflet-icon:hover .gpx-poi-pin {
  transform: scale(1.08);
}

.gpx-poi-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1.5px solid #fff;
  box-sizing: border-box;
  flex-shrink: 0;
}

.gpx-poi-badge svg {
  display: block;
  width: 16px;
  height: 16px;
}

.gpx-poi-dot {
  width: 8px;
  height: 8px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-sizing: border-box;
  flex-shrink: 0;
}

.gpx-poi-tooltip-inner {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  font-family: "Ubuntu", sans-serif;
  width: 260px;
  max-width: min(300px, calc(100vw - 2rem));
  box-sizing: border-box;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
}

.gpx-poi-tooltip-inner strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.25;
}

.gpx-poi-tooltip-inner span {
  display: block;
  font-size: 13px;
  color: #444;
  line-height: 1.45;
}

.leaflet-popup.gpx-poi-popup {
  margin-bottom: 0;
  z-index: 701;
}

.leaflet-popup.gpx-poi-popup .leaflet-popup-content-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 8px;
}

.leaflet-popup.gpx-poi-popup .leaflet-popup-content {
  margin: 0;
  width: 260px !important;
  max-width: min(300px, calc(100vw - 2rem));
}

.leaflet-popup.gpx-poi-popup .leaflet-popup-tip-container {
  display: none;
}

.gpx-route-map-profile .elevation-control .background {
  overflow: visible;
}

.gpx-route-map-profile .elevation-control .point text {
  font-size: 11px;
  font-weight: 700;
}

.gpx-route-map-profile .elevation-control .point.top text {
  paint-order: stroke fill;
  stroke: #fff;
  stroke-width: 3px;
}

/* Celoobrazovka mapy trasy (nové okno) */
.gpx-map-fullscreen-page {
  margin: 0;
  overflow: hidden;
  background: #f3f4f6;
}

.gpx-map-fullscreen-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.gpx-map-fullscreen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.gpx-map-fullscreen-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Ubuntu", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
}

.gpx-map-fullscreen-back:hover {
  color: #f7232d;
}

.gpx-map-fullscreen-back .nav-button-arrow {
  width: 1rem;
  height: 1rem;
  transform: rotate(180deg);
}

.gpx-map-fullscreen-title {
  margin: 0;
  font-family: "Ubuntu", sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #374151;
  text-align: right;
}

.gpx-route-map-wrap--fullscreen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.gpx-route-map-wrap--fullscreen .gpx-route-map-host {
  flex: 1;
  min-height: 0;
  position: relative;
}

.gpx-route-map-wrap--fullscreen .gpx-route-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.gpx-route-map-wrap--fullscreen .gpx-route-map-profile {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  min-height: 160px;
  height: clamp(160px, 26vh, 240px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.gpx-route-map-wrap--fullscreen .gpx-route-map-actions {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
}

@media (max-width: 640px) {
  .gpx-map-fullscreen-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .gpx-map-fullscreen-title {
    text-align: left;
  }

  .gpx-poi-tooltip-inner,
  .leaflet-popup.gpx-poi-popup .leaflet-popup-content {
    width: min(280px, calc(100vw - 2rem)) !important;
  }
}
