.app,
body {
  height: 100dvh;
  width: 100dvw;
  max-width: 100%;
  overflow: hidden;
}

.navbar form {
  margin-left: 15rem;
  width: 100%;
  max-width: 400px;
}

#map {
  height: 100%;
}

.layers-card,
.capacity-card {
  width: 18rem;
  z-index: 1000;
  bottom: 10%;
  right: 2%;
}

.capacity-card {
  bottom: 5%;
  left: 5%;
}

.results-container {
  font-size: 0.7rem;
  width: 100%;
  height: auto;
  max-height: 20rem;
  overflow-y: auto;
  z-index: 1000;
  bottom: 0;
  left: 0%;

  .btn-close#results-close {
    top: 10px;
    right: 10px;
    z-index: 99999;
  }
}

/* --- Sticky headers for both results tables --- */
.results-container table thead th {
  position: sticky;
  top: 0; /* sits at the very top of the scrolling card */
  z-index: 5; /* higher than rows */
  background: #212529; /* match .table-dark header bg so it doesn't go transparent */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); /* subtle separator line while scrolling */
}

/* Optional: make the thead row itself sticky too (helps in some browsers) */
.results-container table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* --- No-liable pane: make the warning bar sticky, then offset the header --- */
.results-container.no-liable .no-liable-warning {
  position: sticky;
  top: 0;
  z-index: 6; /* above the header */
  background: #212529; /* solid bg so content under it doesn't show through */
}

/* Adjust this offset to the warning bar's height (≈48–56px depending on content) */
.results-container.no-liable table thead th,
.results-container.no-liable table thead {
  top: 56px;
}

/* Smooth scroll inside the card when you jump pages */
.results-container {
  scroll-behavior: smooth;
}

/* Keeps header cells above row hover background in Bootstrap */
.results-container table tbody tr:hover > * {
  position: relative;
  z-index: 1;
}

table td,
table th {
  padding: 0.8rem !important;
  font-size: 0.9rem;
  cursor: pointer;
}

table {
  text-align: center;
}

.alert {
  max-width: 20rem;
  z-index: 1000;
  bottom: 5%;
  right: 50%;
  transform: translate(50%, 0);
  font-size: 1rem;
}

.spinner-border {
  z-index: 1000;
  top: 50%;
  left: 50%;
}

.thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.btn-close {
  background-color: #dc3545 !important;
  padding: 5px;
}

.badge {
  white-space: break-spaces;
  line-height: 1.5 !important;
}

.badge-results {
  font-size: 0.75rem;
}

#staticBackdrop {
  backdrop-filter: blur(1px);
  background-color: rgba(0, 0, 0, 0.292);
  opacity: 1 !important;
}

.modal-dialog {
  width: 45%;
  max-width: 45%;
  top: 5rem;

  .alert {
    position: relative;
    bottom: unset;
    right: unset;
    transform: unset;
    width: 100%;
    max-width: 100%;
  }
}

/* Hide prev/next controls just in case */
/* Κρύψε βελάκια για να μη γίνεται navigation */
.gprev,
.gnext {
  display: none !important;
}

/* Ομαλή περιστροφή/κέντρο */
.gslide-image img,
.gslide-media img {
  transition: transform 0.2s ease;
  transform-origin: center center;
}

/* Rotate button styling */
.gbtn-rotate {
  position: absolute;
  top: 3px;
  right: 54px; /* λίγο αριστερά από το X */
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 10px 12px;
  font-size: 38px; /* πιο μεγάλο εικονίδιο */
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  color: #007bfe;
  border-radius: 10px;
}
.gbtn-rotate:hover {
  background: rgba(0, 0, 0, 0.8);
}
