/* Reset pro tělo */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
}

#map_portal {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#map-container {
  flex: 1;
  position: relative;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e0e0e0;
}

/* Tlačítka */
.toggle-btn {
  position: absolute;
  top: 10px;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  text-align: center;
  line-height: 40px;
}
.toggle-btn.left { left: 10px; }
.toggle-btn.right { right: 10px; }

/* Sidebary */
.sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 300px;
  background: #f8f8f8;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 5;
}
.sidebar.left {
  left: 0;
  transform: translateX(-100%);
}
.sidebar.right {
  right: 0;
  transform: translateX(100%);
}
.sidebar.open {
  transform: translateX(0);
}

/* Panelové sekce */
.sidebar_group {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}
.sidebar_group h3 {
  margin-top: 0;
}

/* Výsledky */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
.result-table th,
.result-table td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: le
}

.ol-zoom button,
.ol-zoom-btn-toggle {
  display: block;
  width: 32px;
  height: 32px;
  margin: 2px;
  font-size: 18px;
  background: rgba(255,255,255,0.9);
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}

.ol-zoom-btn-toggle:hover {
  background: rgba(240,240,240,1);
}

/* ────────────────────────────── */
/* Levý sidebar – základ */

.sidebar.left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 80%;
  background: #fafafa;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 500;
  padding: 1em;
  font-family: sans-serif;
}

/* Otevřený stav */
.sidebar.left.open {
  transform: translateX(0);
}

/* Skryji scrolly, hezčí vzhled */
.sidebar_group + .sidebar_group {
  margin-top: 1.5em;
}

/* Nadpisy sekcí */
.sidebar_group h3 {
  font-size: 1.1em;
  margin-bottom: 0.5em;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.3em;
}

/* Seznam vrstev */
.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.layer-group {
  margin-bottom: 1em;
}
.layer-item {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  margin-bottom: 0.5em;
}
.layer-item label {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 0.95em;
}
.layer-item input[type="checkbox"] {
  margin-right: 0.5em;
}
.layer-item input[type="range"] {
  width: 90px;
  margin-left: 0.5em;
}


.sidebar_group button:hover {
  background: #f0f0f0;
}

/* Výsledkový formulář */
#parcelTable, #ownerTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.result-table th,
.result-table td {
  border: 1px solid #ddd;
  padding: 0.4em;
  font-size: 0.9em;
}
.result-table th {
  background: #f5f5f5;
}

/* Koordinační výstup */
#coordsOutput {
  font-size: 0.85em;
  color: #555;
  margin-top: 0.5em;
}

/* Hamburger tlačítko uvnitř panelu */
.ol-zoom .ol-zoom-btn-toggle {
  margin-bottom: 4px;
}

/* Mobilní responzivita */
@media (max-width: 600px) {
  .sidebar.left {
    width: 100%;
  }
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: #e9e9e9;
  border: none;
  padding: 0.6em 1em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: #ddd;
}

.accordion-header .label {
  flex-grow: 1;
  text-align: left;
}

.accordion-header .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.1em;
  margin-left: 1em;
}

.accordion-header.active .arrow {
  transform: rotate(90deg);
}
.accordion-content{
  padding: 0;
}

/* Vyhledávací sekce */
.sidebar_group select,
.sidebar_group input[type="text"],
.sidebar_group button {
  display: block;
  width: 100%;
  padding: 0.5em 0.8em;
  font-size: 1em;
  margin-bottom: 0.5em;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.sidebar_group select:focus,
.sidebar_group input[type="text"]:focus {
  border-color: var(--color-urad);
  outline: none;
}

.sidebar_group button {
  background-color: var(--color-urad);
  color: #fff;
  border: none;
  cursor: pointer;
}

.sidebar_group button:hover {
  background-color: var(--color-urad);
}
