/* styles.css */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Bilder bleiben sichtbar, auch beim Ziehen */
    background-color: black; /* Schwarzer Hintergrund */
}
/* Übersicht-Container */
#overview {
	position: fixed;
	top: 0;
	left: 0;
	width: 85%;
	height: 90%;
	background-color: rgba(0, 0, 0, 1); /* Dunkler Hintergrund */
    border-bottom: 200px solid #000000;
    border-right: 200px solid #000000;
	display: none; /* Standardmäßig ausgeblendet */
	flex-wrap: nowrap; /* Kategorien nebeneinander */
	align-items: flex-start; /* Kategorien oben ausrichten */
	overflow-y: auto; /* Scrollen, falls zu viele Bilder */
	overflow-x: auto; /* Scrollen, falls zu viele Bilder */
	z-index: 1001; /* Über dem Overlay */
	padding-left: 70px; /* Abstand zum Rand */
    padding-right: 250px;
    padding-bottom: 50px;
}

/* Seitenleiste */
#sidebar {
    width: 50px; /* Standardbreite */
    height: 100%; /* Volle Höhe des Containers */
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgba(40, 38, 38, 0.85);
    color: white; /* Textfarbe */
    padding: 10px; /* Innenabstand */
    box-sizing: border-box; /* Padding in der Breite berücksichtigen */
    position: fixed; /* Fixierte Position */
    top: 0;
    left: 0;
    z-index: 1000; /* Über anderen Inhalten */
    transition: width 0.3s ease; /* Sanfte Animation für die Breitenänderung */
    overflow: auto; /* Versteckt überlaufenden Inhalt */
}

/* Erweiterte Seitenleiste */
#sidebar.expanded {
    width: 200px; /* Erweiterte Breite */
    background-color: rgba(40, 38, 38, 0.85);
}

/* Überschrift in der Seitenleiste */
#sidebar h3 {
    margin: 0 0 15px 0; /* Abstand nach unten */
    padding: 0;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap; /* Text in einer Zeile halten */
    overflow: hidden; /* Text abschneiden */
    text-overflow: ellipsis; /* ... anzeigen, wenn der Text zu lang ist */
}

/* Buttons in der Seitenleiste */
#sidebar button {
    display: block;
    width: 100%;
    height: 40px;
    margin: 5px 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    color: white;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
    overflow: hidden; /* Text abschneiden */
    white-space: nowrap; /* Text in einer Zeile halten */
    text-overflow: ellipsis; /* ... anzeigen, wenn der Text zu lang ist */
}

/* Stil für den aktiven Button */
#sidebar button.active {
    background-color: rgba(26, 31, 115, 0.85);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    font-weight: bold;
}

/* Hover-Effekt für den aktiven Button */
#sidebar button.active:hover {
     background-color: rgba(26, 31, 115, 0.85);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    font-weight: bold;
}

/* Hover-Effekt für Buttons */
#sidebar button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(56, 48, 48);
}
/* "Neue Gallerie"-Button */
#sidebar button.new-gallery-btn {
    margin-top: 20px;
background-color: rgba(20, 104, 36, 0.85);

}

#sidebar button.new-gallery-btn:hover {
background-color: rgba(20, 104, 36, 0.85);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
}


/* Stile für den "Schließen"-Button */
#close-overview-btn {
    position: fixed; /* Positioniere den Button oben rechts im overview */
    bottom: 10px;
    right: 10px;
	width: 45px;
	height: 45px;
    background-color: rgba(10, 8, 8, 0.75);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    z-index: 1000; /* Stelle sicher, dass der Button über anderen Elementen liegt */
}

#close-overview-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(56, 48, 48);
}

/* Stile für den "Schließen"-Button */
#save-overview-btn {
    position: fixed; /* Positioniere den Button oben rechts im overview */
    bottom: 10px;
    right: 67px;
	width: 45px;
	height: 45px;
	margin-right: 5px;
    background-color: rgba(10, 8, 8, 0.75);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000; /* Stelle sicher, dass der Button über anderen Elementen liegt */
}
#save-overview-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(56, 48, 48);
}
#save-overview-btn.active,
#save-overview-btn.active:hover {
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(133, 18, 18);
}
#save-overview-btn.active2,
#save-overview-btn.active2:hover {
     background-color: rgba(20, 104, 36, 0.85); 
}

/* Stile für den "Schließen"-Button */
#edit-overview-btn {
    position: fixed; /* Positioniere den Button oben rechts im overview */
    justify-content: center;
    align-items: center;		
    bottom: 10px;
    right: 120px;
    width: 45px;
	height: 45px;
	margin-right: 15px;
    background-color: rgba(10, 8, 8, 0.75);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000; /* Stelle sicher, dass der Button über anderen Elementen liegt */
}
#edit-overview-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(56, 48, 48);
}
#edit-overview-btn.active,
#edit-overview-btn.active:hover {
    background-color: #1f1fb2 !important;
    animation: pulse-red 2s infinite;
}

        /* Grundlegende Stile für die Galerie */
.gallery {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}



.gallery-cat {
    width: 15vw; /* 15% Viewport-Breite */
    min-width: 80px; /* Mindestgröße */
    max-width: 200px; /* Maximalgröße */
    padding-top: 30%;
    aspect-ratio: var(--screen-ratio, 4/3);
    background-color: rgba(86, 78, 78, 0.8);
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        display: flex;
    flex-direction: column; /* Bilder innerhalb einer Kategorie untereinander */
    /*gap: 10px;  Abstand zwischen den Bildern */
    margin-left: 3px; /* Abstand zwischen den Kategorien */
    margin-right: 3px;
    padding: 7px;
    flex-shrink: 0; /* Verhindert, dass die Breite schrumpft */
}


.gallery-cat img {
    position: relative; /* Ermöglicht die Verwendung von z-index */
    /*left: 50%;
    transform: translateX(-50%);  Zentriert das Bild horizontal */
    /*max-width: 150px;  Bilder sind jetzt 20% breit */
    height: auto;
    cursor: pointer; /* Zeigt an, dass die Bilder dragbar sind */
    
    /* TRANSITION FÜR ALLE ANIMATIONEN */
    transition: transform 0.9s ease, opacity 0.5s ease;
}

.category-buttons-container {
    width: 90%; /* 15% Viewport-Breite */
    left: 5%;
    /*background-color: rgba(35, 17, 108, 0.75);
        border: 2px solid #ccc;
    border-radius: 8px;*/
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.buttoncat {
    position: relative;
    bottom: 0px;
	width: 25px;
	height: 25px;
    padding: 0px;
	margin: 0px;
    background-color: rgba(56, 47, 47, 0.75);
        border-radius: 10%;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10; 

}
.buttoncat:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    background-color: rgb(56, 48, 48);
}

/* Wrapper für Bilder */
.image-wrapper {
    position: relative;
    display: inline-block;
    height: 100%; /* 15% Breite */
    margin-bottom: 4%;
    width: auto;
    border: 2px solid #ccc;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Bild innerhalb des Wrappers */
.image-wrapper img {
    display: block;
    max-width: 100%; /* Nimmt maximal Wrapper-Breite */
    max-height: 100%; /* Nimmt maximal Wrapper-Höhe */
    width: auto; /* Auto für natürliche Proportionen */
    height: auto; /* Auto für natürliche Proportionen */
    border-radius: 2px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); 
}

/* Ausgewählter Wrapper (Löschmodus) */
.image-wrapper.selected-for-delete {
    border: 3px solid #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.2) !important;
    opacity: 0.7;
}

/* Bild im ausgewählten Wrapper */
.image-wrapper.selected-for-delete img {
    opacity: 0.5;
}
/* Optional: Hover-Effekt für Wrapper */
.image-wrapper:hover:not(.selected-for-delete) {
    border: 2px solid #666;
    transform: translateY(-2px);
}
/* Optional: Hover-Effekt für Wrapper */
.image-wrapper:hover:not(.selected-for-delete) {
    border: 2px solid #666;
    transform: translateY(-2px);
}

/* Mülleimer-Symbol */
.trash-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    color: #ff4444;
    background: rgba(255, 255, 255, 0.0);
    height: 60%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.trash-icon:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}


/* Für das gezogene Bild während des Ziehens - KEINE TRANSITION 
.gallery-cat img.is-dragging {
    transition: none !important;
}*/
.image-clone {
    opacity: 0;
}
.image-clone.visible {
    left: -25%;
	width : 150%;
    opacity: 1 !important; /* !important um inline-styles zu überschreiben */
}
.clone-drag-enter {
    left: -25% !important;
    width: 150% !important;
    height: 100% !important;
    opacity: 1 !important;
}

/* Wenn ein Bild gezogen wird */
.drag-mode {
    opacity: 0.6 !important;
    transition: opacity 0.3s ease !important;
}

/* Das aktive gezogene Bild */
.dragging-active {
    opacity: 0.4 !important;
}





.Zone_Plus {
    width: 15vw; /* 15% Viewport-Breite */
    min-width: 80px; /* Mindestgröße */
    max-width: 200px; /* Maximalgröße */
    aspect-ratio: var(--screen-ratio, 4/3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed #ccc;
    border-radius: 8px;

}

.Zone_Plus:hover {
    border-color: #666;
    background-color: rgba(0, 0, 0, 0.05);
}
.Zone_Plus.active {
    width: 148px; /* Breite der aktiven Zone_Plus */
    background-color: turquoise; /* Farbe zur Visualisierung */
    transition: width 0.3s; /* Sanfte Übergänge */
}
.plus-icon {
    font-size: 1em;
    color: #666;
    height: 50%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.plus-icon:hover {
    background: rgb(190, 225, 203);
    color: #375407;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Styling für die Lösch-Zone_Plus in der Dummy-Kategorie */
.delete-Zone_Plus {
	position: fixed; /* Positioniere den Button oben rechts im overview */
    bottom: 10px;
    right: 250px;
    width: 250px; /* Gleiche Breite wie die Zone_Plus */
    height: 31px; /* Höhe des Buttons */
    background-color: #ff4444; /* Rote Farbe */
    border: 2px dashed #fff; /* Weißer gestrichelter Rand */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
	margin-right: 50px;
	padding-right: 50px;
}
.delete-Zone_Plus.active {
    background-color: #ff6666; /* Hellere Farbe beim Aktivieren */
}

.open-button {
	position: fixed; /* Positioniere den Button oben rechts im overview */
    bottom: 10px;
    right: 140px;
    width: 150px; /* Gleiche Breite wie die Zone_Plus */
    height: 35px; /* Höhe des Buttons */
    background-color: #44ff44; /* Grüne Farbe */
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.open-button:hover {
    background-color: #66ff66; /* Hellere Farbe beim Hovern */
}


#folder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 1); /* Dunkler Hintergrund */ /* Dunkles Overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002; /* Über allem anderen */
}

#folder-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 1); /* Dunkler Hintergrund */ /* Dunkles Overlay */
    padding: 20px;
    border-radius: 10px;
}

.folder-image {
    cursor: pointer;
    text-align: center;
}

.folder-image img {
    width: 100px;
    height: auto;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.folder-image img:hover {
    border-color: #44ff44; /* Grüne Farbe beim Hovern */
}

#close-folder-modal {
    position: absolute;
    top: 20px;
    right: 20px;
	height: 30px;
	width: 90px;
    background-color: #ff4444; /* Rote Farbe */
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1003; /* Über dem Modal */
}

#close-folder-modal:hover {
    background-color: #ff6666; /* Hellere Farbe beim Hovern */
}

#open-folder-modal {
    position: absolute;
    top: 60px;
    right: 20px;
	height: 30px;
	width: 90px;
    background-color: #44ff44; /* Grüne Farbe */
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1003; /* Über dem Modal */
}

#open-folder-modal:hover {
        background-color: #66ff66;  /* Hellere Farbe beim Hovern */
}


/* Stile für den Karten-Container */
#map-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9); /* Dunkles Overlay */
    z-index: 1002; /* Über allem anderen */
	cursor: default !important; /* Verhindert Hand-Cursor */
}

#close-map-button {
    position: absolute;
    bottom: 100px;
    right: 20px;
    padding: 10px 20px;
    background-color: #ff4444; /* Rote Farbe */
    color: white;
    border: none;
	z-index: 1003; /* Über der Karte */
    cursor: pointer;
}

#close-map-button:hover {
    background-color: #ff6666; /* Hellere Farbe beim Hovern */
}

#center-map-button {
    position: absolute;
    bottom: 100px;
    right: 130px; /* Links neben dem Schließen-Button */
	padding: 2px 10px;
    background-color: #4CAF50; /* Grüne Farbe */
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1003; /* Über der Karte */
    font-size: 24px;
}
#context-menu button {
    border: 5px solid #ccc; /* Randfarbe und -stärke */
    border-radius: 10px; /* Abrundung der Ecken */
    padding: 8px 16px; /* Innenabstand (oben/unten und links/rechts) */
    background-color: #f9f9f9; /* Hintergrundfarbe */
    color: #333; /* Textfarbe */
    font-size: 16px; /* Schriftgröße */
    cursor: pointer; /* Zeiger-Cursor beim Darüberfahren */
    margin: 4px 0; /* Abstand zwischen den Buttons */
    transition: background-color 0.3s, border-color 0.3s; /* Übergangseffekt */
}

#context-menu button:hover {
    background-color: #e0e0e0; /* Hintergrundfarbe beim Darüberfahren */
    border-color: #999; /* Randfarbe beim Darüberfahren */
}

#context-menu div {
    padding: 8px 12px;
    cursor: pointer;
}

#context-menu div:hover {
    background-color: #f0f0f0;
}

        #top-menu {
            position: fixed;
            bottom: 60px;
            right: 20px;
            background-color: #fff;
            padding: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            z-index: 1003;
            display: block;
            flex-direction: column;
            gap: 8px;
        }

        #top-menu button {
            border: 2px solid #ccc;
            border-radius: 10px;
            padding: 8px 16px;
            background-color: #f9f9f9;
            color: #333;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s, border-color 0.3s;
        }

        #top-menu button:hover {
            background-color: #e0e0e0;
            border-color: #999;
        }

/* Stile für das Popup */
/* Stile für das Popup */
.leaflet-popup-content {
    width: 500px !important; /* Breite des Popups anpassen */

    max-height: 1500px; /* Maximale Höhe des Popups */
    overflow-y: hidden; /* Scrollen bei zu viel Inhalt */
    padding: 15px; /* Innenabstand vergrößern */
}

/* Stile für das Textarea */
.leaflet-popup-content textarea {
    width: 100% !important; /* Volle Breite des Popups nutzen */
    height: 100px; /* Höhe des Textfelds */
    box-sizing: border-box; /* Padding und Border in der Breite berücksichtigen */
    resize: vertical; /* Erlaube vertikales Resizing */
    font-family: Arial, sans-serif; /* Schriftart anpassen */
    font-size: 14px; /* Schriftgröße anpassen */
    padding: 8px; /* Innenabstand */
    border: 1px solid #ccc; /* Rahmen */
    border-radius: 4px; /* Abgerundete Ecken */
    white-space: pre-wrap; /* Zeilenumbrüche beibehalten */
    word-wrap: break-word; /* Lange Wörter umbrechen */
}

/* Stile für die Buttons im Popup */
.leaflet-popup-content button {
    display: inline-block; /* Buttons nebeneinander anzeigen */
    width: auto; /* Breite automatisch anpassen */
    margin: 5px; /* Abstand zwischen den Buttons */
    padding: 8px 16px; /* Innenabstand */
    background-color: #0078a8; /* Hintergrundfarbe */
    color: white; /* Schriftfarbe */
    border: none; /* Kein Rahmen */
    border-radius: 4px; /* Abgerundete Ecken */
    cursor: pointer; /* Zeige Pointer-Cursor */
    font-size: 14px; /* Schriftgröße anpassen */
}

/* Stile für den Löschen-Button */
.leaflet-popup-content button.delete-button {
    background-color: #ff4444; /* Rote Farbe für den Löschen-Button */
}

.leaflet-popup-content button.delete-button:hover {
    background-color: #ff6666; /* Hellere Farbe beim Hovern */
}

/* Stile für den Move-Button */
.leaflet-popup-content button.move-button {
    background-color: #0078a8; /* Grüne Farbe für den Move-Button */
}

.leaflet-popup-content button.move-button:hover {
    background-color: #547FA3; /* Hellere Farbe beim Hovern */
}

/* Stile für das Foto */
#photo-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* Stile für das Canvas */
#photo-canvas {
    width: 100%; /* Volle Breite des Popups */
    height: 150px; /* Feste Höhe für das Canvas */
    background-color: rgba(0, 0, 0, 0.1); /* Dunkles Overlay */
    pointer-events: all; /* Ermöglicht Interaktion mit dem Canvas */
    margin-bottom: 10px; /* Abstand nach unten */
}

/* Stile für die Buttons */
#photo-popup button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 5px;
    font-size: 14px;
    cursor: pointer;
}