/* Globaler Stil */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

h1 {
    text-align: center;
    margin: 10px 0;
    font-size: 42px;
    color: #333;
}

h2 {
    max-width: 800px;
    margin: 10px auto;
}

nav {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 0 20px;
    /*width: 98%;*/
    z-index: 1000;
    justify-content: space-between;
    overflow: visible;
}

.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    min-height: 58px;
}

.nav-links {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    margin: auto;
}

.nav-links li {
    position: relative;
    left: -5px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 15px;
    font-size: large;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown {
    position: relative; /* Damit sich das Dropdown am Hauptmenüpunkt orientiert */
    text-align: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #007bff;
    min-width: 200px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    opacity: 0; /* Anfangs unsichtbar */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    visibility: hidden; /* Verhindert Klicks, solange es verborgen ist */
}

.show-dropdown {
    display: block !important;
    opacity: 1; /* Sichtbar machen */
    visibility: visible;
    background-color: #4ea3ff;
    
}

.dropdown-content a {
    display: block;
    padding: 10px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.dropbtn {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Verhindert Zeilenumbruch */
    gap: 5px; /* Abstand zwischen Text und Pfeil */
}

/* Mobile Ansicht 
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        background-color: #007bff;
        padding: 15px;
    }

    .dropdown-content {
        position: static;
        width: auto;
    }

    .nav-links .dropdown {
        display: block;
    }
}*/

/* Hamburger Menü */
.hamburger {
    display: none;
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 28px;
}

/* Mobile Menü */
@media (max-width: 1300px) {
    .hamburger {
        display: block;
        max-width: 60px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        right: -15px;
        width: 250px;
        background-color: #007bff;
        border-radius: 8px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .nav-links.show {
        display: flex;
        top: 46px;
        box-shadow: 5px 5px 5px 0px #5757578f;
    }

    .nav-links a {
        display: block;
        padding: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .dropdown-content {
        position: static;
        text-align: left;
    }
}

.table-container {
    width: calc(100% - 20px);
    overflow-x: auto; /* Ermöglicht horizontales Scrollen */
    white-space: nowrap; /* Verhindert Umbruch der Tabellenelemente */
    padding: 10px;
}

table {
    width: 100%;
    min-width: 800px; /* Mindestbreite für die Tabelle, anpassbar */
    border-collapse: collapse; 
    margin: auto;
    font-size: 18px;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

#pdfgeninput {
    width: calc(40% - 6px);
}

#pdfgenbutton {
    width: 20%;
    display: inline;
}

#search {
    width: calc(80% - 25px);
}

#filter {
    width: 20%;
    display: inline;
}

#logo {
    width: 100%;
    max-width: 600px;
    margin: 0px auto;
    display: block;
}

.logo {
    height: 40px; /* Kleinere Höhe für das Logo */
    /*max-width: 120px;  Maximale Breite setzen */
    /*position: absolute;*/
    top: 10px;
    left: 10px;
    object-fit: contain; /* Stellt sicher, dass das Bild nicht verzerrt wird */
}

#login {
    max-width: 600px;
    margin: auto;
}

.conten {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 80px;
}

.selection-container, .search-container {
    padding-bottom: 15px; /* Abstand zwischen Auswahl- und Suchfeld */
}

#grundriss-select, #searchBox {
    margin-bottom: 15px; /* Einheitlicher Abstand für Auswahl- und Suchfeld */
}

.status-ok {
    color: green;
    font-weight: bold;
}

.status-bad {
    color: red;
    font-weight: bold;
}

/* Tabellen-Design */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 18px;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.styled-table thead {
    /* background-color: #007bff; */
    color: white;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 15px;
}

.pagination-btn {
    text-decoration: none;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    transition: 0.3s ease;
}

.pagination-btn:hover {
    background-color: #0056b3;
}

/* Links */
.links {
    list-style-type: none;
    padding: 0;
}

.links li {
    display: inline-block;
    margin: 10px;
}

.links a {
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.links a:hover {
    background-color: #0056b3;
}

/* Grundriss & Lampen */
#zoom-container {
    width: 100%;
    max-width: 800px;
    height: 500px;
    overflow: auto;
    border: 2px solid #ccc;
    position: relative;
    touch-action: none;
}

#map-wrapper {
    transform-origin: top left;
    transform: scale(1);
    position: relative;
}

#grundriss-img {
    width: 2048px; /* Stellt sicher, dass es nicht auf 100% skaliert */
    /* max-width: 100%; /* Festlegen einer maximalen Breite */
    height: 1448px;
    pointer-events: none; /* Verhindert, dass das Bild Klicks blockiert */
}

.lamp {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: red;
    border-radius: 50%;
    cursor: grab;
    pointer-events: auto; /* Erlaubt Klicks auf die Lampen */
    z-index: 10; /* Bringt die Lampen über das Bild */
}


/* Lampen-Container */
#lamp-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Verhindert Klickprobleme */
}

.lamp:active {
    cursor: grabbing;
}

.lamp-name {
    position: absolute;
    width: auto;
    /* font-size: 22px; */
    font-weight: bold;
    color: red;
    text-align: left;
    /* background: transparent; */
    /* border: 1px solid #ccc; */
    z-index: 20; /* Damit es über der Lampe liegt */
    pointer-events: auto; /* Textfeld bleibt klickbar */
    background-color: rgba(175, 175, 175, 0.80); /* Transparent */
    border-radius: 30px; /* Runden */
    padding: 5px; /* Innenabstand */
    border: none; /* Entferne den standardmäßigen Rand */
}

/* Formular-Styling */
#startseite, #flash-messages, #box {
    /* width: 100%; */
    max-width: 800px;
    margin: 10px auto;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Formularelemente */
.form-group {
    /*display: flex;*/
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

label {
    font-weight: bold;
    width: 25%;
    display: block ruby;
}

input, select, textarea {
    width: calc(100% - 18px); 
    /*width: 100%; */
    font-size: 16px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

button {
    display: block;
    width: 100%;
    background: #007BFF;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    /* margin-bottom: 10px; */
    margin: 5px 0;
}

button:hover {
    background: #0056b3;
}

/* Feldset-Stil */
fieldset {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    form {
        padding: 10px;
        min-width: 229px;
    }

    label {
        font-size: 14px;
    }

    input, textarea, select {
        font-size: 14px;
    }

    /* button {
        font-size: 14px;
        padding: 8px;
    } */

    fieldset {
        padding: 8px;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    label {
        margin-bottom: 5px;
    }

    /* input, select, textarea {
        width: calc(100% - 30px);
    } */
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 18px;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.highlighted-row {
    background-color: #f8d7da; /* Erste Zeile bekommt eine dezente rote Hervorhebung */
}

.delete-btn {
    background-color: #dc3545 !important;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #bd2130 !important;
}

.save-btn {
    display: block;
    margin: auto;
    padding: 10px 15px;
    font-size: 16px;
    background-color: #28a745 !important;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.save-btn:hover {
    background-color: #218838 !important;
}
.hidden-row {
    display: none;
}

footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content a {
    color: #00aced;
    text-decoration: none;
    margin: 0 10px;
}

.footer-content a:hover {
    text-decoration: underline;
}

.wrapper {
    min-height: 100vh; /* Stellt sicher, dass Content & Footer zusammen die volle Höhe haben */
    display: flex;
    flex-direction: column;
}

.content {
    flex-grow: 1; /* Erweitert den Hauptinhalt automatisch, um den Footer nach unten zu drücken */
    padding: 20px;
}

thead {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #007BFF99;
    color: white;
}

tbody {
    background-color: #a2a2a21f;
} 

#box-tabelle {
    /* width: fit-content; */
    margin: 10px auto;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: fit-content;
}

#box-scroll {
    overflow: scroll;
}

/* Allgemeiner Dark Mode */
.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

/* Navigation */
.nav-links.dark-mode {
    background-color: #333;
}
.nav-links.dark-mode a {
    color: #fff;
}
.nav-links.dark-mode a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer.dark-mode {
    background-color: #222;
    color: #fff;
}

/* Tabellen */
table.dark-mode {
    background-color: #232323;
    border: 1px solid #444;
}
table.dark-mode th, table.dark-mode td {
    color: #ffffff;
    border-color: #555;
}
table.dark-mode thead {
    background-color: #444;
}

/* Eingabefelder & Buttons */
input.dark-mode, textarea.dark-mode, select.dark-mode {
    background-color: #333;
    color: #fff;
    border: 1px solid #666;
}
button.dark-mode {
    background-color: #444;
    color: #fff;
    border: 1px solid #666;
}
button.dark-mode:hover {
    background-color: #555;
}

/* Karten & Popups */
.map-container.dark-mode {
    background-color: #181818;
    border: 1px solid #444;
}
.popup.dark-mode {
    background-color: #282828;
    color: #fff;
}

/* Flash-Nachrichten */
#flash-messages.dark-mode {
    background-color: #222;
    border-left: 4px solid #007bff;
}

/* Dropdown-Menü */
.dropdown-content.dark-mode {
    background-color: #282828;
}
.dropdown-content.dark-mode a {
    color: #ddd;
}
.dropdown-content.dark-mode a:hover {
    background-color: #444;
}

/* Dark Mode für Boxen & Flash-Nachrichten */
.dark-mode #startseite,
.dark-mode #box-tabelle,
.dark-mode #flash-messages,
.dark-mode #box {
    background: #222; /* Dunkler Hintergrund */
    color: #ffffff; /* Helle Schrift */
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3); /* Sanftere Schatten */
}

/* Dark Mode für Formularelemente */
.dark-mode .form-group {
    background-color: #282828;
    border: 1px solid #444;
}

/* Schatten für Eingabefelder */
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background-color: #333;
    color: white;
    border: 1px solid #666;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark Mode für die Navigation */
.dark-mode nav {
    background-color: #333;
    color: white;
}

