/* ============================================================ */
/* Floating Messages                                            */
/* ============================================================ */

#floatingMessages .alert {
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.alert.fade-out {
    transition: opacity 1.5s ease-out;
}

/* ============================================================ */
/* Begrenze Sidebar-Breite */
.sidebar-ns {
    max-width: 300px;
    background-color: #252525;
    /* dunkler Hintergrund */
    padding: 1rem;
    border-right: 1px solid #333;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
}

/* Hauptinhalt optisch absetzen */
.main-content-ns {
    background-color: #252525;
    padding: 1rem;
    border-left: 1px solid #444;
    min-height: 100%;
    color: #f1f1f1;
}


.form-layout {
    width: 100%;
    max-width: none;
}

.form-layout .form-group,
.form-layout .form-control,
.form-layout .form-select,
.form-layout select,
.form-layout input:not([type="radio"]):not([type="checkbox"]),
.form-layout textarea,
.form-layout .dropzone,
.form-layout + .dropzone,
#inspection_dropzone,
#survey_dropzone,
#project_dropzone {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.dropzone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    padding: 1rem;
    min-height: 150px;
}

/* DARK ACCORDION für nspect_grid */

.accordion.accordion-dark {
    background-color: transparent;
}

.accordion.accordion-dark .accordion-item {
    background-color: #222325;
    border: 1px solid #333;
    color: #e2e2e2;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
}

.accordion.accordion-dark .accordion-header {
    background-color: transparent;
    border-bottom: 0;
}

.accordion.accordion-dark .accordion-button {
    background-color: #232323;
    color: #f1f1f1;
    font-weight: 500;
    border: none;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    transition: background 0.2s;
}

.accordion.accordion-dark .accordion-button.collapsed {
    background-color: #232323;
    color: #bbb;
    border-radius: 8px;
}

.accordion.accordion-dark .accordion-button:not(.collapsed) {
    background-color: #232e3a;
    color: #f9f9f9;
    border-bottom: 1px solid #3a3a3a;
    border-radius: 8px 8px 0 0;
}

.accordion.accordion-dark .accordion-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3876c3;
}

.accordion.accordion-dark .accordion-body {
    background-color: #1c1c1e;
    color: #e2e2e2;
    border-radius: 0 0 8px 8px;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.accordion.accordion-dark .accordion-button::after {
    filter: invert(1) brightness(1.7);
    opacity: 0.9;
}


/* Globaler Body/Scrollbar-Style für alle Seiten 
html, body {
    min-height: 100vh !important;
}
body {
    overflow-y: auto !important;
}
*/


/* Globaler Body/Scrollbar-Style für alle Seiten */
html,
body {
    height: 100%;
    min-height: 100vh;
}

/* Footer for Imprint and body layout */
.footer {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    background-color: #212529 !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
}

/* Ensure footer is always visible */
.footer.mt-auto {
    margin-top: auto !important;
}

/* Ensure footer text is visible */
.footer .container {
    width: 100% !important;
}

/* Fix body layout to ensure footer positioning */
body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* Make sure main content area takes available space */
.container-fluid {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.row {
    flex: 1 0 auto;
    min-height: 0;
}

.main-content-ns {
    flex: 1 0 auto;
    min-height: 0;
    /* Optional: for scrolling if content overflows */
    overflow-y: auto;
}

body.survey-viewer-page {
    height: 100vh;
    height: 100dvh;
    min-height: 0 !important;
    overflow: hidden;
}

.survey-viewer-page > .simple-navbar {
    flex-shrink: 0;
    margin-bottom: 0;
}

.survey-viewer-page > .container-fluid,
.survey-viewer-page > .container-fluid > .row {
    flex: 1 1 0;
    overflow: hidden;
}

.survey-viewer-page .sidebar-ns {
    height: 100%;
    max-height: 100%;
    margin-bottom: 0 !important;
}

.survey-viewer-page .main-content-ns {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.survey-viewer-workspace {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    position: relative;
}

@media (max-width: 767.98px) {
    .survey-viewer-page > .container-fluid > .row {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .survey-viewer-page .sidebar-ns {
        flex: 0 1 auto;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 35%;
    }

    .survey-viewer-page .main-content-ns {
        width: 100%;
    }
}