/* MAPA */
#map {
  position: relative;
  width: 100%;
  height: 500px;
  border: 2px solid #ccc;
  margin-bottom: 2rem;
}

/* HLEDACÍ FORMULÁŘE */
.search-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  justify-content: space-between;
}

.form-group {
  flex: 1 1 45%;
  background: #f7f7f7;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-group button {
  padding: 0.5rem 1rem;
  background-color: #00796b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-group button:hover {
  background-color: #004d40;
}

/* VÝSLEDKY */
.results-section {
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.grave-card {
  background: #eef6f3;
  border-left: 4px solid #00796b;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.grave-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #004d40;
}

.grave-card p {
  margin: 0.2rem 0;
}
.hrbitov-layout {
  display: flex;
  gap: 1.5rem;
  height: 500px;
}

.hrbitov-mapbox {
  flex: 3;
  min-width: 0;
  background: #f0f0f0;
  position: relative;
    height: 500px;
}

.hrbitov-sidebar {
  flex: 1;
  max-width: 320px;
  background: #f9f9f9;
  padding: 1rem;
  border-left: 1px solid #ddd;
  overflow-y: auto;
}

.hrbitov-sidebar input,
.hrbitov-sidebar button {
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.hrbitov-sidebar button {
  background: var(--color-urad, #444);
  color: #fff;
  cursor: pointer;
}

.hrbitov-sidebar button:hover {
  background: var(--color-urad-dark, #222);
}
.ol-popup {
  background: white;
  padding: 8px;
  border: 1px solid #333;
  border-radius: 4px;
  min-width: 200px;
}
.vysledky__wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.vysledek-karta {
  flex: 1 1 20%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.vysledek-karta h3 {
  margin-top: 0;
  font-size: 1.2rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.karta-body {
  padding-top: 0.5rem;
  font-size: 0.95rem;
}
.smlouva-platna {
  font-weight: bold;
  color: #000;
}

.smlouva-prosla {
  color: #999;
  opacity: 0.7;
}
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  padding: 1em 1.5em;
  border-radius: 5px;
  min-width: 300px;
  max-width: 500px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 5px; right: 10px;
  font-size: 20px;
  cursor: pointer;
}

#admin-controls button {
  margin-right: 0.5em;
}
#admin-controls {
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
}
.admin-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
}

.admin-buttons button {
  display: block;
  width: 100%;
}
#admin-controls .edit-btn {
  background-color: #555;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
#admin-controls .edit-btn:hover {
  background-color: #a1a1a1;
}

/* Modal */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  z-index: 1000;
  overflow-y: auto; /* 💡 scroll */
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 1.5rem;
  max-width: 80vw;
  max-height: 80vh;
  width: 90%;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-family: Arial, sans-serif;
  overflow-y: auto; /* 💡 scroll */
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content label {
  display: block;
  font-size: 0.95rem;
  color: #333;
}

.modal-content input,
.modal-content select {
  width: 90%;
  padding: 0.4rem;
  font-size: 0.95rem;
  margin-top: 0.2rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-content button[type="submit"] {
  background-color: #006400;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
}
.modal-content button[type="submit"]:hover {
  background-color: #004c00;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}
.modal-close:hover {
  color: #000;
}
.form-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

fieldset {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 1em;
}

legend {
  font-weight: bold;
  padding: 0 0.5rem;
}
form select {
  width: 100%;
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#kon-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  background-color: gray;
  height: 80vh;
}


 .pagePreview{
    page-break-after: always;
    height: 90%;
    font-size: 1vh;
    padding: 1em;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0.5em;
    background-color: white;
    aspect-ratio: 210/297;
  }
.tiskKarta {
    border: 1px solid #000;
    padding: 0.2em;
    box-sizing: border-box;
    font-size: 1em;
    display: flex;
    flex-direction: column;
    justify-content: start;
    height: 100%;
  }
  .tiskKarta h4{
    font-size: 2em;
    text-align-last: center;
  }
  .tiskKarta p{
    font-size: 1.3em;
    margin: 0;
  }

/* Tisková pravidla */
@media print {
  body * {
    visibility: hidden;
  }

  #print-container, #print-container * {
    visibility: visible;
  }

  #print-container {
    position: absolute;
    top: 0;
    left: 0;
  }

  .pageTisk {
    page-break-after: always;
    width: 210mm;
    height: 297mm;
    padding: 10mm;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 3mm;
  }

  .tiskKarta {
    border: 1px solid #000;
    padding: 3mm;
    box-sizing: border-box;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    height: 100%;
  }
  .tiskKarta h4{
    font-size: 1.5rem;
    text-align-last: center;
  }
  .tiskKarta p{
    font-size: 1rem;
    margin: 0;
  }
}