﻿html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* Layout: Sidebar + Galerie */
:root {
    --nav-height: 56px;
    --footer-height: 40px;
}

body {
    display: flex;
    flex-direction: column;
}


.navbar {
    height: var(--nav-height);
    min-height: var(--nav-height);
    margin-bottom: 0
}

    .navbar > .container,
    .navbar > .container-fluid {
        height: 100%;
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
    }

footer {
    height: var(--footer-height);
    display: flex;
   /* line-height: var(--footer-height);*/ /* Text vertikal zentrieren */
}

    footer > .container,
    footer > .container-fluid {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.app-root {
    /*height: calc(100vh - var(--nav-height) - var(--footer-height));*/
    height: calc(var(--vh) * 100 - var(--nav-height) - var(--footer-height));
    display: flex;
    overflow: hidden;
   /* outline: 5px solid red; */
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Basis für Animation */
.collapsible {
    overflow: hidden;
    transition: height .35s ease;
}

/* Icon-Drehung */

/*
.toggle-icon,
.toggle-icon-small {
    display: inline-block;
    transition: transform .25s ease;
}
    */

.rotated {
    transform: rotate(-90deg);
}



/* --- TAG BADGES --- */
.tag-badge {
    display: inline-block;
    background: #0078d4;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 14px;
    margin: 2px;
    white-space: nowrap;
}

    .tag-badge:hover {
        background: #005ea2;
    }

/* Normalzustand */
.sidebar-wrapper {
    transition: width 0.3s ease, flex-basis 0.3s ease;
    overflow-y: auto; /* verhindert Überstehen */
}


.app-root.sidebar-collapsed .sidebar-wrapper {
    flex: 0 0 20px;
    width: 20px;
    overflow: hidden; /* verhindert Überstehen */
}


.sidebar-top {
    position: relative;
    height: 35px; /* definiert den oberen Bereich */
    background-color: #ebebf2;
    display: flex;
    align-items: center; /* Button vertikal zentriert */
    padding-left: -20px; /* etwas Abstand links */
    border-radius: 0 8px 8px 0;
}


/* Sidebar Standard */
.sidebar {
    margin-top: 0px;
    width: 280px; /* oder deine Sidebar-Breite */
    flex-shrink: 0;
    overflow-y: auto; /* 👈 eigener Scroll */
    overflow-x: hidden;
    border-right: 1px solid #ddd;
    background: #f7f7f7;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: width 0.25s ease, transform 0.25s ease;
    z-index: 1020; /*1500;*/
}

    .sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

.sidebar h4 {
    margin-bottom: 10px;
    font-weight: 600;
}



    
/* Wenn ausgeblendet */
.app-root.sidebar-collapsed .sidebar {
    width: 0;
    transform: translateX(-100%);
  /*  overflow: hidden;*/
}

/* ============================= */
/* Overlay (Mobile) */
/* ============================= */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1400;
}

.app-root.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}


/* content mit eigener Scroll */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    transition: margin-left 0.25s ease;
    /* outline: 3px solid red;*/
}

/* Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    top: 55px; /* unter Navbar */
    left: 260px;
    z-index: 1000;/*1030*/
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 5px;
    transition: all 0.2s ease;
}

    .sidebar-toggle-btn:hover {
        background: #f3f3f3;
    }


.app-root.sidebar-collapsed .sidebar-toggle-btn {
    left: 0px;
}

.sidebar-toggle-icon {
    font-size: 1.2rem;
    float: right;
    margin-left: 0px;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Icon drehen */
.app-root.sidebar-collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}


@media (max-width: 768px) {
    .sidebar-toggle-icon {
        display: inline-block;
        font-size: 18px;
        /*   background: red !important; */
    }

        .sidebar-toggle-icon::before {
            content: none !important;
        }
}

/* ============================= */
/* Overlay (Mobile) */
/* ============================= */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1400;
}

.app-root.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}




.reise-liste {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reise-liste li {
    margin-bottom: 6px;
}

.reise-liste a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    display: block;
    border-radius: 6px;
}

.reise-liste li.active a,
.reise-liste a:hover {
    background: #0d6efd;
    color: white;
}



/* Sidebar */
.sidebar-section {
    margin-bottom: 20px;
}

/* Sidebar-Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 6px;
}

.sidebar-header:hover {
    background: #e3e3e3;
}

.sidebar-top-button {
    padding: 5px 0;

}

    .sidebar-top-button .btn {
        font-weight: bold;
        text-align: center;
    }


.sidebar-clr-filter-button {
    padding: 5px 0;
}

    .sidebar-clr-filter-button .btn {
        font-weight: bold;
        text-align: center;
    }


.sidebar-separator {
    border-color: #ddd;
    margin: 10px 0 15px 0;
}



.toggle-icon {
    font-size: 1.2rem;
    transition: transform .3s ease;
}

.toggle-icon-small {
    font-size: .9rem;
    float: right;
    margin-left: 5px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height .3s ease;
}

.sidebar-list.collapsed {
    max-height: 0;
}


.jahr-reiseheader {
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    border-radius: 4px;
}

    .jahr-reiseheader:hover {
        background: #e6e6e6;
    }

.jahr-header {
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    border-radius: 4px;
}

.jahr-header:hover {
    background: #e6e6e6;
}

.monat-liste {
    overflow: hidden;
    transition: height .35s ease;
    height: 0; /* collapsed default */
    padding-left: 16px;
}

.monat-liste li a {
    font-size: 0.9rem;
    padding: 4px 10px;
}

.monat-liste li.active > a {
    background: #0d6efd;
    color: white;
}

.monat-liste.collapsed {
    max-height: 0;
}

.monat-liste.expanded {
    height: auto; /* wird von JS nach Slide gesetzt */
}

.rotated {
    transform: rotate(-90deg);
}

.sidebar-list a {
    display: block;
    padding: 4px 6px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.sidebar-list li.active > a,
.sidebar-list a:hover {
    background: #0d6efd;
    color: white;
}

.sidebar-check {
    margin-bottom: 4px;
    margin-left: 20px;
    font-size: 0.9rem;
}

    .sidebar-check input {
        cursor: pointer;
    }

    .sidebar-check label {
        cursor: pointer;
    }




/* Optional: Reiseanzeige im Eintrag */
.gallery-reise {
    font-size: 0.8rem;
    color: #555;
    margin-top: 4px;
}


/* --- IMAGE GALLERY --- */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .image-gallery .image-item {
        position: relative;
        display: inline-block;
        border-radius: 8px;
        border-color: black;
        border-width: 2px;
        border-style: solid;
        overflow: hidden;
        box-shadow: 10px 0px 25px #555;
    }

        .image-gallery .image-item img {
            max-width: 180px;
            height: auto;
            display: block;
            border-radius: 6px;
        }

    /* Delete button over image */
    .image-gallery .delete-btn {
        position: absolute;
        top: 4px;
        right: 4px;
        background: rgba(220, 0, 0, 0.8);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 26px;
        height: 26px;
        font-size: 14px;
        cursor: pointer;
    }

        .image-gallery .delete-btn:hover {
            background: rgba(180, 0, 0, 0.95);
        }


/* Dropzone (jetzt auch die Preview) */
.dropzone {
    border: 2px dashed #999;
    background: #fafafa;
    padding: 20px;
    min-height: 150px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    /* Info-Text */
    .dropzone p {
        width: 100%;
        text-align: center;
        color: #666;
    }

/* einzelnes Bild */
.dropzone-item {
    position: relative;
}

    .dropzone-item img {
        max-width: 140px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

/* X-Löschen Button */
.dropzone-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(180, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-weight: bold;
    line-height: 18px;
}

.sortable-images {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sortable-item {
    width: 150px;
    height: 120px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 5px;
    background: white;
    cursor: grab;
    position: relative;
}

    .sortable-item img {
        max-width: 100%;
        max-height: 100%;
        border-radius: 6px;
    }

    .sortable-item.sortable-ghost {
        opacity: 0.4;
    }

/* Responsive Bildhöhe */
@media (max-width: 576px) {
    .gallery-image {
        height: 180px;
    }
}

@media (min-width: 1200px) {
    .gallery-image {
        height: 260px;
    }
}


/* Raster */
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 2fr)) !important;
    gap: 16px !important;
   
}

/* Karte */
.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    transition: transform .2s ease, box-shadow .2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
}

    .gallery-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0,0,0,.12);
    }

/* Bild */
.gallery-image {
    width: 100%;
    height: 190px;
    max-width: 420px; /* 👈 MAXIMALE BILDBREITE */
    object-fit: cover;
    cursor: zoom-in;
    display: block;
    margin: 0 auto; /* Bild zentrieren */
    transition: transform .25s ease;
}

/* Info-Bereich (Edit-Klick) */
.gallery-info {
    padding: 12px;
    background: #fff;
    cursor: pointer;
    border-top: 1px solid #ccc;
    pointer-events: auto;
}

/* Button zum Löschen eines Eintrages*/
.gallery-menu-btn {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    pointer-events: auto;
    z-index: 5;
}

    .gallery-menu-btn:hover {
        color: #dc3545; /* rot */
    }



.gallery-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-meta {
    color: #666;
    font-size: 0.9rem;
}


/* --------------------------
   LIGHTBOX STYLE
--------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1040;
    display: none; /*flex; */
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox.active {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events:auto;
}

.lightbox-inner img {
    display: block;
    margin: 0 auto; /* ← zusätzliche Absicherung */

    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
}

.lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: calc(100vh - 40px); */ /* ← ENTSCHEIDEND */
    max-width: 90vw;
}

.lightbox img {
    display: block;
    max-height: 100%; /* nutzt die 90vh */
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ← DAS ist der Schlüssel */
    margin: 0 auto;
    border-radius: 6px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
    transform-origin: center center;
    user-select: none;
}


/* Lightbox schliessen */
.lightbox-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

    .lightbox-controls button {
        width: 38px;
        height: 38px;
        font-size: 18px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;

        border: 1px solid rgba(255, 255, 255, 0.8);
        background: transparent;
        color: #fff;
        border-radius: 6px;
        padding: 6px 10px;
        cursor: pointer;
        transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    }

        .lightbox-controls button:hover {
            border-color: rgba(0, 0, 0, 0.9);
            background-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 6px rgba(255,255,255,0.4);
        }

/* Bei Fullscreen den x Button ausblenden */
.lightbox:fullscreen .lightbox-controls button {
    display: none;
}









/**/
.lightbox-nav {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    z-index: 10000;
    opacity: 0.75;
}

    .lightbox-nav:hover {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.18);
        border-color: rgba(0, 0, 0, 0.9);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }

    .lightbox-nav.prev {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .lightbox-nav.next {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

/* iPad / iOS Safari */
@media (pointer: coarse) {
   /* .lightbox-nav.prev,
    .lightbox-nav.next {
        display: none !important;
    }*/
    .lightbox-nav {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }
    .lightbox-geo {
        bottom: 56px; /* höher setzen */
    }
}

   

.lightbox-image.zoomed {
    cursor: grab;
}

.lightbox-image.dragging {
    cursor: grabbing;
}

/* Swipe und Zoom auf Bild erlauben */
#lightbox-image {
    touch-action: pan-y pinch-zoom;
    transform-origin: center center;
    will-change: transform;
}

:fullscreen #lightbox-image,
:-webkit-full-screen #lightbox-image {
    touch-action: none;
}

/*
/* Lightbox schliessen */
.lightbox-screen-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1050;
}

        .lightbox-screen-controls button {
            width: 38px;
            height: 38px;
            font-size: 18px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;

            border: 1px solid rgba(255, 255, 255, 0.8);
            background: transparent;
            color: #fff;
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
        }

        .lightbox-screen-controls button:hover {
            border-color: rgba(0, 0, 0, 0.9);
            background-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 6px rgba(255,255,255,0.4);
        }


.lightbox-fullscreen {
    touch-action: pan-y pinch-zoom;
}

.lightbox:fullscreen .lightbox-image {
    pointer-events: auto;
}

/* Geodaten editieren  */
.lightbox-geoedit-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
}

    .lightbox-geoedit-btn:hover {
        background: rgba(255,255,255,0.15);
        border-color: white;
    }

/* Bei Fullscreen ausblenden */
.lightbox:fullscreen .lightbox-geoedit-btn {
    display: none !important;
}

   
    
    /* Minimap der Karte nicht sichtbar wenn Lightbox im Fullscreen */
    .lightbox:fullscreen .lightbox-mini-map {
    display: none !important;
}

.lightbox-meta {
    margin-top: 10px;
    text-align: center;
    color: white;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Bildzähler in der Lightbox */
.lightbox-counter {
    position: absolute;
    top: 5px; /* über Geo-Box */
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    user-select: none;
}

.lightbox:fullscreen .lightbox-counter {
    display: none !important;
}


/* Geo-Box als Overlay unten mittig auf dem Bild */
.lightbox-geo {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    max-width: 80%;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}


/* Minimap der Karte nicht sichtbar wenn Lightbox im Fullscreen */
.lightbox:fullscreen .lightbox-geo {
    display: none !important;
}

  

/* Mini-Karte unten rechts */
.lightbox-mini-map {
    position: absolute;
    bottom: 60px;
    right: 12px;
    width: 150px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    border: 1px solid rgba(255,255,255,0.6);
    cursor: zoom-in;
    display: none; /* wird nur bei GPS gezeigt */
    touch-action: pan-x pan-y pinch-zoom; /* Karte darf alles  */
}


#lightboxMapModal.modal {
    z-index: 1060;
}


/* Zoomtasten in der Lightbox */
.lightbox-zoom-controls {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

    .lightbox-zoom-controls button {
        width: 36px;
        height: 36px;
        font-size: 20px;
        font-weight: bold;
        color: #fff;
        background: rgba(0,0,0,0.5);
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }

        .lightbox-zoom-controls button:hover {
            background: rgba(0,0,0,0.75);
        }


.modal {
    z-index: 2005 !important;
}

.modal-backdrop {
    z-index: 2000;
}

/* Reisen Liste */
.reisen-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height .3s ease;
}

.reisen-liste.collapsed {
    max-height: 0;
}

.reisen-liste > li {
    margin-bottom: 6px;
}

.reisen-liste a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    display: block;
    border-radius: 6px;
}

    .reisen-liste li.active > a,
    .reisen-liste a:hover {
        background: #0d6efd;
        color: white;
    }

/* Aktives Reise-Jahr */
.jahr-reiseitem.active > .jahr-reiseheader {
    font-weight: 600;
    color: #0d6efd;
}

/* Aktive Reise */
.reise-item.active > a {
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
}

.reise-count {
    font-size: 0.85em;
    opacity: 0.7;
}

.reise-item.active .reise-count {
    opacity: 1;
    font-weight: 600;
}


.reise-name {
    font-size: 0.85em;
    opacity: 0.7;
}

.reise-item.active .reise-name {
    opacity: 1;
    font-weight: 600;
}

/* Jahr und die zugehörende Anzahl Einträge anzeigen  */
/* Im Kalender und bei den Reisen verwendet */
.jahr-header {
    display: flex;
    align-items: center; /* vertikal zentriert */
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0;
}

.jahr-label {
    display: inline-flex;
    align-items: center; /* ZENTRIERT Jahr + Zähler */
    gap: 6px; /* Abstand Jahr ↔ Zähler */
}

.jahr-text {
    font-weight: 500;
}

.jahr-count {
    font-size: 0.7em;
    color: #6c757d;
    white-space: nowrap;
}



/* Kalenderliste */
/* Aktives Reise-Jahr */
.jahr-item.active > .jahr-header {
    font-weight: 600;
    color: #0d6efd;
}

/* Kalender einklappbar */
.kalender-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height .3s ease;
}

    .kalender-liste.collapsed {
        max-height: 0;
    }

.kalender-liste > li {
    margin-bottom: 6px;
}

.kalender-liste a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    display: block;
    border-radius: 6px;
}

    .kalender-liste li.active > a,
    .kalender-liste a:hover {
        background: #0d6efd;
        color: white;
    }

/* Aktive Kalendermonat */
.kalender-item.active > a {
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
}



/* Filter für Datum Von - Bis */
.date-filter-box {
    padding: 10px;
    background: #f7f7f7;
    border-radius: 6px;
    margin-bottom: 20px;
}

    .date-filter-box label {
        font-size: 0.85rem;
        color: #444;
    }

.collapsible {
    overflow: hidden;
    transition: height .35s ease;
}

.rotated {
    transform: rotate(-90deg);
}

/* Filter Schnellauswahl Reisezeitraum */
.quick-range {
    margin-top: 10px;
}

    .quick-range label {
        font-size: 0.85rem;
        color: #444;
    }

    .quick-range .quickbtn {
        margin-bottom: 6px;
        width: 100%;
        text-align: left;
    }

/* Letzte Reise optisch hervorheben */
.lasttrip > a {
    font-weight: bold;
    color: #c97a00 !important;
}

.badge-lasttrip {
    color: #c97a00;
    margin-left: 6px;
    font-size: 1rem;
}

/* Wenn aktiv + letzte Reise */
.active.lasttrip > a {
    background-color: #c97a00 !important;
    color: white !important;
    border-radius: 4px;
}

/* Foto Preview im Modalen Dialog "Neuer Eintrag" */
.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-wrapper {
    position: relative;
    display: inline-block;
}

.preview-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
}

/* Meldungen im modalen Dialog "Neuer Einrag" */
#gps-message {
    min-height: 18px;
}

    #gps-message.error {
        color: #c00;
    }

    #gps-message.success {
        color: #090;
    }

    #gps-message.info {
        color: #036;
    }

main {
    flex: 1;
    min-height: 0;
}


/* ------------------------------------- */
/* Edit Page */
/* ------------------------------------- */
.page-tagebuch-edit main,
.page-tagebuch-edit .content {
    display: block;
    overflow: hidden; /* Content auf Edit-Seite vom Scrollen ausschließen */
}

/* Edit-Seite als Flex-Container aufbauen */
.page-tagebuch-edit .edit-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Edit-Layout explizit scrollbar machen */
.page-tagebuch-edit .edit-layout {
    flex: 1; /* nimmt restliche Höhe ein */
    overflow-y: auto; /* ← HIER scrollen */
    overflow-x: hidden;
    padding-right: 8px; /* Platz für Scrollbar */
}

/* Edit-Header fix halten */
.page-tagebuch-edit .edit-header {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    padding-bottom: 1rem;
}

.edit-page {
    display: block;
    width: 100%;
}

.edit-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notes-box {
    resize: vertical;
    min-height: 220px;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tag-check {
    background: #f1f3f5;
    padding: .4rem .7rem;
    border-radius: 20px;
    cursor: pointer;
}

    .tag-check input {
        display: none;
    }

        .tag-check input:checked + span {
            font-weight: 600;
        }
.image-grid {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.image-tile {
    position: relative;
    cursor: grab;
}

    .image-tile img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px;
        cursor: grab;
    }

    .image-tile.dragging {
        opacity: 0.4;
        cursor: grabbing;
    }

    .image-tile.drag-over {
        outline: 2px dashed #0d6efd;
    }



.edit-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

.edit-left,
.edit-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .edit-layout {
        grid-template-columns: 1fr;
    }
}

/* Stichwortliste  */
.page-tagebuch-edit .stichwort-list {
    display: flex;
    flex-direction: column; /* 👈 untereinander */
    gap: 0.5rem;
    max-height: 100px; /* 👈 Scroll-Grenze */
    overflow-y: auto;
    padding-right: 4px;
}

/* Bestimmte Label FETT darstellen*/
.page-tagebuch-edit .label-highlight {
    font-weight: 700;
}



/* Delete Buttton auf dem Bild */
.delete-img {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 14px;
    cursor: pointer;
}
.photo-upload-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
}

.photo-upload-left {
    display: flex;
    flex-direction: column;
}

.photo-upload-right {
    min-height: 160px;
}

.preview-container.large {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .preview-container.large img {
        width: 110px;
        height: 110px;
        object-fit: cover;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0,0,0,.15);
    }

.preview-wrapper {
    position: relative;
    display: inline-block;
}

.preview-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 0, 0, 0.8);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
}

.preview-wrapper:hover .preview-remove {
    opacity: 1;
}

.image-tile.no-geo {
    outline: 2px solid rgba(220, 53, 69, 0.95); /* Bootstrap-danger */
    outline-offset: 2px;
    border-radius: 8px;
}

    .image-tile.no-geo .preview-thumb {
        border-radius: 8px; /* damit es sauber aussieht */
    }

/* Optionales Badge oben links */
.geo-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    pointer-events: none;
}





/* Mobile */
@media (max-width: 768px) {
    .photo-upload-grid {
        grid-template-columns: 1fr;
    }
}





