@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html,body{height:100%;margin:0;font-family: 'Inter', sans-serif; color: #333;}
#app{
  display:grid;
  grid-template-rows: auto 1fr;
  grid-template-columns:320px 1fr;
  height:100%;
  position:relative;
  background: linear-gradient(to bottom right, #f0f4f8, #e7edf3);
}
#app.sidebar-collapsed{grid-template-columns:0 1fr}
#sidebar{
  padding:15px;
  border-right:1px solid #e0e0e0;
  overflow-y:auto;
  font-size:14px;
  line-height:1.6;
  background-color: #ffffff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  border-radius: 0 8px 8px 0;
}
#map{height:100%; border-radius: 8px; overflow: hidden; margin: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);}
fieldset{
  border:1px solid #e0e0e0;
  border-radius:8px;
  margin:15px 0;
  padding:12px 15px;
  background-color: #fcfcfc;
  box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}
fieldset legend {
  font-weight: 600;
  color: #0050b5;
  padding: 0 8px;
}
.range-row{display:flex;align-items:center;gap:10px; margin-top: 8px;}
.small{color:#666;font-size:12px}
.btn{
  display:inline-block;
  padding:8px 15px;
  background:#007bff;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  border:none;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-decoration: none;
}
.btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
select, input[type="range"] {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 14px;
  background-color: #fff;
}
select {
  width: calc(100% - 70px);
  margin-left: 5px;
}
input[type="checkbox"], input[type="radio"] {
  margin-right: 5px;
}

/* Right attribute panel (ponecháno) */
#attrPanel{
  position:absolute;
  top:10px;
  right:10px;
  width:400px;
  max-width:45vw;
  max-height:85vh;
  background:#ffffff;
  border:1px solid #e0e0e0;
  border-radius:10px;
  box-shadow:0 5px 20px rgba(0,0,0,.1);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:500;
}
#attrPanel header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 15px;
  background:#f0f4f8;
  border-bottom:1px solid #e5e5e5;
  font-weight:700;
  color: #333;
}
#attrBody{padding:15px;overflow:auto}
#attrBody table { width: 100%; border-collapse: collapse; }
#attrBody td { padding: 6px 0; border-bottom: 1px solid #eee; }
#attrBody tr:last-child td { border-bottom: none; }
#attrBody td:first-child { font-weight: 500; width: 40%; }
#attrClose{background:transparent;border:none;font-size:24px;line-height:1;cursor:pointer; color: #666; transition: color 0.2s ease;}
#attrClose:hover { color: #333; }

/* === STYLY PRO HORNÍ PRUH === */
#header-bar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  background-color: #2c3e50;
  color: #ecf0f1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}
#header-bar .btn {
  background-color: #3498db;
  padding: 6px 12px;
  font-size: 1rem;
  box-shadow: none;
}
#header-bar .btn:hover {
  background-color: #2980b9;
}
.header-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}
.header-logo {
  height: 35px;
  width: auto;
}

/* === STYLY PRO STATICKÉ VRSTVY === */
.table-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.btn.btn-small {
  padding: 2px 8px;
  font-size: 12px;
}

/* === SPODNÍ ATRIBUTOVÁ TABULKA === */
#table-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 33vh;
  background-color: #ffffff;
  border-top: 2px solid #007bff;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
  z-index: 1001;
  display: none;
  flex-direction: column;
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
}

/* Hlavička tabulky */
#table-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}
#table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
#table-toolbar .btn {
  background-color: #6c757d;
}
#table-toolbar .btn:hover {
  background-color: #5a6268;
}
#table-toolbar #table-filter {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 8px;
}
#table-info {
  text-align: center;
}
#table-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-right: 10px;
}
#table-count {
  font-size: 0.9rem;
  color: #555;
}
#table-close {
  background: transparent;
  border: none;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 5px;
}
#table-close:hover {
  color: #000;
}

/* === ZÁLOŽKY (TABY) ATRIBUTOVÝCH TABULEK === */
#tab-bar{
  display:flex;
  gap:6px;
  align-items:center;
  margin-left:10px;
}
.tab-btn{
  background:#e9ecef;
  color:#333;
  border:1px solid #cfd4da;
  border-radius:6px;
  padding:6px 10px;
  cursor:pointer;
  font-size:13px;
  line-height:1;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tab-btn:hover{ background:#dde2e6; }
.tab-btn.active{
  background:#007bff;
  color:#fff;
  border-color:#007bff;
  box-shadow:0 0 0 2px rgba(0,123,255,0.25);
}
.tab-btn.kb.active{ background:#0056b3; border-color:#0056b3; }
.tab-btn.pp.active{ background:#b85c00; border-color:#b85c00; }

/* Kontejner tabulky (skrol) */
#table-wrapper {
  overflow: auto;
  height: 100%;
}

#attribute-table {
  width: 100%;
  border-collapse: collapse;
}
#attribute-table thead {
  position: sticky;
  top: 0;
  background-color: #e9ecef;
  z-index: 10;
}
#attribute-table th,
#attribute-table td {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
#attribute-table th { font-weight: 600; }
#attribute-table tbody tr {
  cursor: pointer;
  transition: background-color 0.1s ease;
}
#attribute-table tbody tr:hover { background-color: #f0f8ff; }

/* PŮVODNÍ styl pro vybraný řádek */
#attribute-table tbody tr.selected-row {
  background-color: #007bff;
  color: #ffffff;
  font-weight: bold;
}

/* NOVÉ: fokusovaný řádek (výběr ve vybraných) = ŽLUTĚ
   Přebije selected-row, pokud má řádek obě třídy. */
#attribute-table tbody tr.focused-row{
  background-color: #ffd400;
  color: #222;
  font-weight: 700;
}
#attribute-table tbody tr.selected-row.focused-row{
  background-color: #ffd400;
  color: #222;
  font-weight: 700;
}

/* === VÝRAZNĚJŠÍ ZVÝRAZNĚNÍ V MAPĚ (Leaflet SVG) ===
   className se propíše na SVG prvek jako class=""
   Drop-shadow funguje v moderních prohlížečích a udělá "glow" i při překryvech. */
.feat-glow-yellow{
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.85))
          drop-shadow(0 0 6px rgba(255,234,0,0.95))
          drop-shadow(0 0 12px rgba(255,234,0,0.75));
}

/* Pokud chceš, aby i cyan výběr byl lehce čitelnější (volitelné) */
.feat-cyan{
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.55))
          drop-shadow(0 0 6px rgba(0,255,255,0.65));
}

/* === NÁHLED (PREVIEW) – dočasné zvýraznění při přejetí řádku tabulky === */
.feat-glow-preview{
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.85))
          drop-shadow(0 0 6px rgba(255,234,0,0.75))
          drop-shadow(0 0 14px rgba(255,234,0,0.55));
}
