/* Globales Styling für einheitliches Garten/Natur-Design */

/* Grundlegende Einstellungen */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif; /* Moderne Schriftart */
    background-color: #f4f7f3; /* Helles Grün/Grau als Hintergrund */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container-Styling */
.container {
    flex: 1 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 90%; /* Container nimmt 90% der Bildschirmbreite ein */
    margin: 0 auto;
    background-color: #ffffff; /* Weißer Hintergrund für Inhalt */
    border-radius: 8px; /* Leicht abgerundete Ecken */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtiler Schatten */
}

/* Footer-Styling */
footer {
    flex-shrink: 0;
    width: 100%;
    background-color: #e6f3e6; /* Helles Grün für Natur-Thema */
    text-align: center;
    padding: 10px 0;
    color: #333;
}

/* Navigation-Styling */
header {
    background-color: #28a745; /* Grün für Navigation */
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 90%;
    margin: 0 auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
    margin: 0 5px; /* Reduzierter Abstand für schlankeres Design */
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 12px; /* Kleinere Padding-Werte */
    display: block;
    font-size: 14px; /* Kleinere Schriftgröße */
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: #218838; /* Dunkleres Grün bei Hover */
}

/* Dropdown-Menü */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    margin-left: 5px;
    font-size: 10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    color: #333;
    padding: 10px;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* Logout-Button */
.logout-button {
    background-color: #dc3545;
    border-radius: 4px;
    margin-left: auto; /* Logout rechts ausrichten */
}

.logout-button:hover {
    background-color: #c82333;
}

/* Tabellen-Styling */
.table-responsive, .table-container {
    width: 100%; /* Table-responsive nimmt die volle Breite des Containers ein */
    overflow-x: auto;
}

table {
    width: 100%; /* Tabelle nimmt die volle Breite des table-responsive ein */
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
}

table thead {
    background-color: #28a745; /* Grün für Tabellenkopf */
    color: white;
}

table th, table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    color: black;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Abwechselnde Zeilenfarbe */
}

.unplausibel {
    background-color: #f8d7da; /* Roter Hintergrund für unplausible Werte */
}

.geprueft {
    background-color: #e9ecef;
    color: #6c757d;
}

/* Archiv-Tabelle */
table.archiv-table, table.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table.archiv-table th,
table.archiv-table td,
table.log-table th,
table.log-table td {
    border: 1px solid #ccc;
    padding: 8px;
}

table.archiv-table th,
table.log-table th {
    background-color: #28a745; /* Grün für Tabellenkopf */
    color: white;
    text-align: left;
}

table.archiv-table tbody tr:hover,
table.log-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Spezifische Tabellen für admin_review.php */
table#reviewTable, table#reviewedTable {
    width: 100%; /* Spezifisch für reviewTable und reviewedTable */
    table-layout: auto; /* Ermöglicht flexible Spaltenbreiten */
}

table#reviewTable th,
table#reviewTable td,
table#reviewedTable th,
table#reviewedTable td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    color: black;
    min-width: unset; /* Entfernt Mindestbreitenbeschränkungen */
    max-width: unset; /* Entfernt maximale Breitenbeschränkungen */
}

table#reviewTable input[type="number"],
table#reviewTable input[type="date"],
table#reviewedTable input[type="number"],
table#reviewedTable input[type="date"] {
    width: 100%; /* Eingabefelder nehmen die volle Zellenbreite ein */
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

table#reviewTable .infobox,
table#reviewedTable .infobox {
    white-space: pre-wrap; /* Erlaubt Zeilenumbrüche in Infobox */
}

/* Bildvorschau */
.thumbnail {
    max-width: 100px; /* Kleine Bildvorschau */
    height: auto;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
}

/* Button-Styling */
.btn {
    padding: 8px 12px;
    margin: 2px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-bestaetigen {
    background-color: #28a745; /* Grün für Bestätigen */
    color: white;
}

.btn-bestaetigen:hover {
    background-color: #218838; /* Dunkleres Grün bei Hover */
}

.btn-ablehnen, .btn-loeschen {
    background-color: #dc3545; /* Rot für Ablehnen/Löschen */
    color: white;
}

.btn-ablehnen:hover, .btn-loeschen:hover {
    background-color: #c82333; /* Dunkleres Rot bei Hover */
}

.btn-aendern {
    background-color: #ffc107; /* Gelb für Ändern */
    color: white;
}

.btn-aendern:hover {
    background-color: #e0a800; /* Dunkleres Gelb bei Hover */
}

/* Suchfeld */
.search-container {
    margin-bottom: 20px;
}

.search-container input {
    padding: 8px;
    font-size: 16px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Modal-Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: black;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

#archivContent, #logContent, #uploadContent {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

/* Formular-Styling */
.form-container {
    width: 100%; /* Formular nimmt die volle Breite des Containers ein */
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.form-container input[type="text"],
.form-container input[type="number"],
.form-container input[type="date"],
.form-container input[type="email"],
.form-container input[type="file"],
.form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-container textarea {
    resize: vertical; /* Erlaubt vertikale Größenanpassung */
    min-height: 100px; /* Mindesthöhe für Textareas */
}

.form-container input:focus,
.form-container textarea:focus {
    border-color: #28a745; /* Grün für Fokus */
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
    outline: none;
}

.form-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.form-container .error {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
}

.form-container .success {
    color: #28a745;
    margin-top: 10px;
    font-size: 14px;
    background-color: #d4edda;
    padding: 10px;
    border-radius: 4px;
}

/* Erfolgsmeldung */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Dokumentenliste */
.documents-list {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.documents-list li {
    margin-bottom: 10px;
}

.documents-list a {
    color: #28a745;
    text-decoration: none;
    font-size: 14px;
}

.documents-list a:hover {
    text-decoration: underline;
}

/* Link-Container */
.link-container {
    margin-top: 10px;
    font-size: 14px;
}

/* Inline-Feld für Checkboxen */
.inline-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.inline-field label {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

/* Responsive Anpassungen */
@media screen and (max-width: 768px) {
    .container, .form-container {
        padding: 0 10px;
    }

    .search-container input {
        width: 100%;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu li {
        width: 100%;
        margin: 5px 0;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .logout-button {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    table, table#reviewTable, table#reviewedTable {
        font-size: 12px;
    }

    .btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    table#reviewTable input[type="number"],
    table#reviewTable input[type="date"],
    table#reviewedTable input[type="number"],
    table#reviewedTable input[type="date"] {
        padding: 6px;
        font-size: 12px;
    }

    .thumbnail {
        max-width: 80px; /* Kleinere Vorschau auf kleineren Bildschirmen */
    }

    .form-container {
        padding: 15px;
    }

    .form-container input[type="text"],
    .form-container input[type="number"],
    .form-container input[type="date"],
    .form-container input[type="email"],
    .form-container input[type="file"],
    .form-container textarea {
        padding: 8px;
        margin-bottom: 15px;
    }

    .form-container button[type="submit"] {
        padding: 10px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    table, table#reviewTable, table#reviewedTable, thead, tbody, th, td, tr {
        display: block;
    }

    table thead {
        display: none;
    }

    table tr {
        margin-bottom: 15px;
    }

    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        color: black;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 15px;
        font-weight: bold;
        text-align: left;
    }

    table#reviewTable input[type="number"],
    table#reviewTable input[type="date"],
    table#reviewedTable input[type="number"],
    table#reviewedTable input[type="date"] {
        width: 100%;
        padding: 6px;
        font-size: 12px;
    }

    .thumbnail {
        max-width: 60px; /* Noch kleinere Vorschau auf sehr kleinen Bildschirmen */
    }

    .form-container {
        padding: 10px;
    }
}