/* =========================================================
   ZÁKLADNÍ STYL STRÁNKY
========================================================= */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f9;
  color: #222;
  overflow: hidden; /* zabrání scrollování při zobrazení grafu */
}

/* =========================================================
   HLAVNÍ ROZLOŽENÍ
========================================================= */
.main-container {
  display: flex;
  height: 100vh; /* mapa až po horní okraj */
}

/* =========================================================
   LEVÝ PANEL
========================================================= */
#sidebar {
  width: 260px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.18); /* jemný stín na pravém okraji */
  z-index: 10; /* aby panel překryl mapu */
}

.sidebar-content {
  padding: 15px;
  flex: 1;
  overflow-y: auto;
}

/* Box kolem celé sekce Trasy */
.trasy-box {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

.trasy-box h3{
  font-size: 1.8em;
}
/* Každý řádek labelu jako flex řada */
.trasa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 1.5em;
  cursor: pointer;
}

.trasa-item input {
  margin-right: 6px;
}

/* vlastní check */
.trasa-item input[type="checkbox"] {
  margin-right: 8px;
}

/* malá barevná čárka (legenda) */
.legend-line {
  display: inline-block;
  width: 36px;
  height: 6px;
  border-radius: 2px;
  margin-left: 8px;
}
/* Barvy jednotlivých tratí – doplň si své */
.legend-komplet {
  background: #6A3414; /* červená nebo jiná tvá barva */
}

.legend-k1 {
  background: #8BBD41; /* Kolo 1 */
}

.legend-k2 {
  background: #EE3823; /* Kolo 2 */
}

.legend-k3 {
  background: #6a1b9a; /* Kolo 3 */
}

.legend-k4 {
  background: #0D65AA; /* modrá pro Kolo 1,5 km */
}

.legend-k5 {
  background: #F4DD2A; /* růžová pro Kolo 1,45 km */
}


/* Hlavička v panelu */
header {
  background: linear-gradient(135deg, #318DC1, #318DC1);
  color: white;
  width: auto;
  padding: 12px 15px;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.18); /* stejný stín i na hlavičce */
  position: relative;
  z-index: 11; /* hlavička nad sidebar obsahem */
  margin: 0;
}

.header-text h1 {
  margin: 0;
  font-size: 2em;
  font-weight: 600;
}

.header-text p {
  margin: 4px 3px 0;
  font-size: 1.5em;
  opacity: 0.9;
}

.sidebar-content h3 {
  margin-top: 0;
  color: #606873;
}

.sidebar-content label {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
}

/* Tlačítko návratu */
#resetView {
  width: 100%;
  padding: 8px;
  background: #526b77;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.3em;
  transition: 0.2s;
  margin-top: 15px;
}

#resetView:hover {
  background: #33424a;
}


.social-links {
  display: flex;
  justify-content: center; /* centrování vodorovně */
  gap: 50px; /* větší mezera mezi ikonami */
  margin-top: 35px; /* větší odsazení od tlačítek */
  padding: 0;
}

.social-link img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-link img:hover {
  transform: scale(1.1);
  opacity: 0.8;
}
/* =========================================================
   LOGO DOLE V PANELU
========================================================= */
.sidebar-logo {
  background: linear-gradient(135deg, #318DC1 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.sidebar-logo img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
}

#fullMap {
  width: 100%;
  padding: 8px;
  background: #526b77;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.3em;
  transition: 0.2s;
  margin-top: 25px;
}

#fullMap:hover {
  background: #33424a;
}
/* =========================================================
   MAPA
========================================================= */
#map-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative; /* pro absolutní pozicování grafu */
}

#map {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* =========================================================
   PANEL S VÝŠKOVÝM PROFILEM
========================================================= */
#profileContainer { 
  position: absolute; 
  bottom: 0; 
  left: 550px; 
  width: calc(32%); 
  height: 40%; /* bylo 33 %, teď je vyšší => protáhlejší graf */ 
  background: #e0eef9ee; 
  border-top: 1px solid #ccc; 
  border-top-left-radius: 3%;
  border-top-right-radius: 3%;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.25); 
  z-index: 999; display: none; transition: 
  transform 0.4s ease, opacity 0.3s ease; } 
  
  
#profileContainer.show { 
  display: block; 
  transform: translateY(0%); opacity: 1; 
} 

#elevationChart { 
  width: 100%; 
  height: 100%; 
}
/* =========================================================
   LEAFLET OVLÁDACÍ PRVKY
========================================================= */
.leaflet-control-scale {
  left: 10px !important;
  bottom: 10px !important;
  right: auto !important;
}

.leaflet-popup-content h2 {
  color: #0d47a1;
  font-size: 1.5em;
  margin-bottom: 6px;
}

.leaflet-popup.top-popup {
  z-index: 99999 !important;  /* překryje všechny vrstvy a panely */
}

/* =========================================================
   PŘEPÍNAČ PODKLADOVÝCH VRSTEV
========================================================= */
.leaflet-control-layers {
  background: #ffffffd0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size: 1.2em;
  padding: 3px 6px;
  backdrop-filter: blur(4px);
  transform: scale(0.9);
  transform-origin: top left;
}

.leaflet-control-layers label {
  display: flex;
  align-items: center;
  margin: 2px 0;
  cursor: pointer;
}

.leaflet-control-layers label span {
  margin-top: 0px;
}

.leaflet-control-layers input[type="radio"],
.leaflet-control-layers input[type="checkbox"] {
  transform: scale(0.9);
  margin-right: 5px;
  accent-color: #318DC1;
}

.leaflet-control-layers span {
  font-weight: 500;
  color: #222;
}

/* Miniatury podkladových vrstev */
.basemap-thumb {
  width: 55px;
  height: 44px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 1px;
  margin-top: 2px;
  transition: transform 0.2s ease;
}

.leaflet-control-layers label:hover .basemap-thumb {
  transform: scale(1.05);
  border-color: #318DC1;
}

.leaflet-control-layers input[type="radio"] {
  display: none;
}

/* Marker nad všemi vrstvami */
.leaflet-pane > .leaflet-marker-pane,
.leaflet-pane > .markerPane {
  z-index: 10000 !important;
  pointer-events: none;
}

/* --- Kulaté check/radio pro trasy --- */
.trasa-item input[type="checkbox"] {
  -webkit-appearance: none;  /* vypne defaultní styl */
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #318DC1;
  border-radius: 50%;        /* 🔹 kulaté */
  cursor: pointer;
  position: relative;
  margin-right: 8px;
}

/* Puntík uvnitř při zaškrtnutí */
.trasa-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background-color: #318DC1;
  border-radius: 50%;
}
