/*-------------------------------------------------------- */
/* Buttons */

.anmerkung-speichern-button,
.zeile-loeschen-button {
  background:none; 
  border:none; 
  padding:0; 
  margin-left:2px;
  font-size:1rem; 
  cursor:pointer; 
  vertical-align:middle;
}

/* Export / Download Button in einheitlichem Stil mit Map-Buttons */
.jsonhandler-export-button,
.map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 8px;
    margin-bottom: 5px;
}

.jsonhandler-export-button:hover,
.map-button:hover {
    background-color: #005177;
}

.jsonhandler-export-button:focus,
.map-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.5);
}

/*-------------------------------------------------------- */
.hidden-before-init {
    opacity: 0;
    pointer-events: none;
}

/*-------------------------------------------------------- */
.jsonhandler-hidden-column {
    display: none !important;
}

/*-------------------------------------------------------- */
div.dataTables_filter {
    padding-right: 10px;
    margin-bottom: 10px;
}

/*-------------------------------------------------------- */
body.lb-open { overflow:hidden; }
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox-content {
    position: relative;
    text-align: center;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

#lightbox-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
}

.lb-ctl {
    padding: 6px 10px;
    font-size: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    cursor: pointer;
    z-index: 10000;
    margin: 0 5px;
}

.lb-controls {
    display: flex;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* -------------------------------------------------------- */
/* Audio Lightbox */
#audio-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#audio-content {
    position: relative;
    background: #111;
    padding: 20px;
    border-radius: 10px;
    max-width: 480px;
    width: 90%;
}

#audio-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}

/* -------------------------------
   Map nur im Popup sichtbar
------------------------------- */
.map-popup-only {
    display: none;          /* unsichtbar auf Hauptseite */
    width: 100%;
    height: 100%;
}

body.map-popup .map-popup-only {
    display: block;         /* sichtbar im Popup */
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

tr.row-hover-map {
    background-color: #fff3cd !important;
    transition: background-color 0.2s ease;
}

#map-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* -------------------------------
   Korrektur der Zoom-Buttons auf der Karte
------------------------------- */
.leaflet-control-zoom a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    width: 26px;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
}

.leaflet-control-zoom a span {
    line-height: 1 !important;
    display: inline-block;
    padding: 0 !important;
}

/* Der entscheidende Unterstrich-Fix */
.leaflet-control-zoom a::after,
.leaflet-control-zoom a::before {
    content: none !important;
    display: none !important;
}

.dataTables_scrollHead table,
.dataTables_scrollBody table {
  width: 100% !important;
}

/* Thumbnails für Images */
.thumb-container {
    display: flex;
    justify-content: center;  /* horizontal zentrieren */
    align-items: center;      /* vertikal zentrieren */
    width: 100px;
    height: 100px;
    overflow: hidden;
}

.thumb-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;      /* Bild bleibt proportional */
    cursor: pointer;
}

