

/*Body*/
body {
    background-color: white;
    font-family: Arial;
}

h1 {
    font-weight: 500;
}

nav .container-fluid {
    max-width: 98%;
    margin: 0 auto; /* zentriert */
}

.navbar-nav > .active > a {
    background-color: #d5dbdb;
}


ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333333;
}


li {
    float: left;
    font-size: 25px;
}

    li a {
        display: block;
        color: white;
        text-align: center;
        padding: 16px;
        text-decoration: none;
    }

    li.active {
        background-color: #8e9794;
        color: white;
    }

    li a.active {
        background-color: #8e9794;
        color: white;
    }

    li a:hover {
        background-color: #111111;
    }

.text-container {
    width: 70%;
    margin: 0 auto;
    padding: 20px;
}

p {
    line-height: 200%;
    text-align: justify;
    text-justify: inter-word;
    color: #333;
}

.interner-link {
    cursor: pointer;
    color: #1a73e8;
    text-decoration: none;
}

    .interner-link:hover {
        text-decoration: underline;
        text-underline-offset: 4px;
        text-decoration-thickness: 2px;
    }




/*Tabelle*/

.table-container {
    width: 98%;
    position: relative;
    max-width: max-content;
    display: block;
    background-color: white;
    border-radius: 4px;
    margin: 0 auto 40px auto;
    border: 1px solid rgba(0,0,0,0.2);
    overflow-x: auto;
    table-layout: auto;
}

#demo {
    width: 100%;
    width: auto;
    border-spacing: 0;
    display: table !important;
    border-collapse: separate;
    border-top: 2px solid #6495ED;
    border-bottom: 2px solid #6495ED;
}

    #demo td,
    #demo th {
        padding-top: 4px;
        padding-bottom: 15px;
        border-bottom: 2px white !important;
        text-align: left;
        vertical-align: top;
        line-height: 1.8;
    }

/*Kopfzeile der Tabelle*/
thead input {
    width: 100%;
    box-sizing: border-box;
}

#demo thead tr:first-child {
    background-color: white;
    border-right: 1px solid white;
}


#demo thead tr:nth-child(2) th {
    background-color: white;
    border-top: none !important;
}

#demo thead th {
    padding-right: 25px;
    white-space: nowrap;
}

#demo thead tr:nth-child(2) input {
    margin-top: 8px;
}

/*Data Table*/

.dataTables_filter {
    display: none;
}

#demo thead input {
    width: 100%;
    padding: 6px 4px;
    border: 1px solid #D3D3D3;
    border-radius: 4px;
    font-size: 14px;
}

    #demo thead input:focus {
        border: 1.5px solid #6495ED;
        outline: none;
    }


/* DataTables Pagination & Buttons */
.dataTables_paginate,
.dataTables_length {
    font-family: Arial;
    margin: 10px 30px;
}

    .dataTables_paginate a {
        padding: 6px 12px;
        margin: 0 3px;
        font-size: 15px;
        color: #333;
        text-decoration: none;
        border-radius: 4px;
        border: 1px solid transparent;
        background: #f5f5f5;
        transition: background 0.15s ease, border-color 0.15s ease;
    }

        .dataTables_paginate a:hover:not(.current):not(.disabled) {
            background: white;
            border: 1px solid #dcdfe3;
            color: black !important;
        }

    .dataTables_paginate .current {
        background: #F0F0F0;
        color: white;
        border: 1px solid #dcdfe3;
        cursor: default;
    }

    .dataTables_paginate .disabled {
        background: white;
        color: #aaa;
        border: 1px solid transparent;
        cursor: default;
    }

.dataTables_length {
    margin-left: 30px !important;
    margin-bottom: 7px !important;
    margin-top: 13px !important;
}


div.dataTables_length select {
    border-radius: 4px !important;
    background: #f4f6f8 !important;
    padding: 5px 10px !important;
    border: 1px solid #dcdfe3 !important;
    font-size: 15px !important;
}

.dataTables_length select:hover {
    border: 1px solid #dcdfe3 !important;
    background: white !important;
}

.dataTables_length select:focus,
.dataTables_length select:focus-visible {
    outline: none !important;
    border: 1px solid #dcdfe3 !important;
    background: white !important;
}
/*Namenpopups*/

.tooltip-name {
    position: relative; /* Bezugspunkt für das absolute Popup */
    cursor: pointer;
    color: #1a73e8;
}

    .tooltip-name:hover {
        text-decoration: underline;
        text-underline-offset: 4px;
        text-decoration-thickness: 2px;
    }

    .tooltip-name .info-text {
        position: absolute;
        left: 0;
        top: 0; /* startet auf dem Namen */
        max-width: 600px;
        width: max-content;
        overflow-wrap: break-word;
        word-wrap: break-word;
        overflow-y: auto;
        background: white;
        padding: 10px 20px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        z-index: 9999;
        font-family: Arial;
        background: white;
        color: #333;
        z-index: 9999;
        line-height: 1.5;
        display: none; /* bleibt versteckt bis click/hover */
    }

    .tooltip-name.active .info-text {
        display: block;
    }

/*Filterpanel*/
#filter-panel {
    box-sizing: border-box;
    width: 98%;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 20px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px auto 20px auto;
}


    #filter-panel label {
        color: black;
        font-family: Arial;
    }

.filter-group,
.year-fields,
.top {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/*Panelelemente erste Zeile*/
.top {
    justify-content: space-between;
}

.radio-container label {
    display: block;
    margin-bottom: 7px;
}

.radio-container input[type="radio"] {
    accent-color: #9f7aea;
}

#bereichFilter input[type="radio"] {
    accent-color: #1a73e8;
}

.result-box {
    display: flex;
    align-items: center;
    padding: 0 0;
    border: 1.5px solid white;
    gap: 6px;
    background: white;
}

.result-number {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
}

.result-label {
    font-weight: bold;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    row-gap: 5px; /* Abstand zwischen den Zeilen */
}


    .active-filters span {
        background: #e1f1fd;
        color: #1246a4;
        padding: 2px 8px;
        border-radius: 12px;
        margin-right: 4px;
        display: inline-block;
        font-family: Arial;
        font-style: oblique;
    }


/*Panelelemente dritte Zeile*/

.filter-group {
    margin-bottom: 10px;
}

.dropdown-filter {
    position: relative;
}

.dropdown-filter {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 200px;
}

    .dropdown-filter button {
        width: 200px;
        background: #f4f6f8;
        border: 1px solid #dcdfe3;
        border-radius: 4px;
        padding: 6px 14px;
        font-size: 15px;
        font-family: Arial;
        color: #333;
        cursor: pointer;
        box-sizing: border-box;
    }

        .dropdown-filter button:hover {
            background: #e9edf2;
        }

        .dropdown-filter button::after {
            content: " ▼";
            font-size: 14px;
            color: #666;
        }

/* Filter-Box */
.filter-box {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    color: #333;
    background: white;
    border: 1px solid #dcdfe3;
    border-radius: 4px;
    padding: 10px;
    padding-right: 15px;
    max-height: 420px;
    overflow-y: auto;
    width: max-content; /* ← passt Breite an Text an */
    min-width: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 5000;
    display: none;
    overflow-x: hidden;
}

    /* Checkboxen in 2 Spalten */
    .filter-box label {
        white-space: nowrap;
        font-family: Arial !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
    }


    .filter-box::-webkit-scrollbar {
        width: 7px;
    }

    .filter-box::-webkit-scrollbar-thumb {
        background: #A9A9A9;
        border-radius: 4px;
    }

    .filter-box input[type="checkbox"] {
        accent-color: #1a73e8;
        width: 14px;
        height: 14px;
        cursor: pointer;
    }





/* Panelelemente vierte Zeile */
.year-fields {
    align-items: flex-end;
}

.yearFilter {
    width: 200px;
    padding: 6px 4px;
    font-size: 15px;
    border: 1px solid #D3D3D3;
    border-radius: 4px;
    box-sizing: border-box;
}


    .yearFilter:hover {
        border: 1.5px solid #6495ED;
    }

    .yearFilter:focus {
        border: 1.5px solid #6495ED;
        outline: none;
    }

    .yearFilter:active {
        border-color: #6495ED;
    }

.year-invalid {
    border: 2px solid red !important;
}


.year-fields label {
    display: flex;
    flex-direction: column;
    text-align: center;
}

    .year-fields label span {
        color: black;
        font-size: 15px;
        margin-bottom: 1px;
    }


#infoContainer {
    position: relative;
    display: inline-block;
}

/* Button */
#infoButton {
    width: 200px;
    background: #e1f1fd;
    color: black;
    border: 1px solid #ccc;
    padding: 6px 0;
    font-family: Arial;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

    #infoButton:hover {
        background: #c1d8f0;
        border: 1.5px solid #6495ED;
    }

/* Popup */
#infoPopup {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    min-width: 300px;
    background: white;
    border: 1px solid #ccc;
    color: #454545;
    border-radius: 4px;
    padding: 10px 20px;
    font-family: Arial;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 4000;
    display: none;
}

#resetFilters {
    width: 200px;
    font-family: Arial;
    font-size: 15px;
    padding: 6px 12px;
    color: white;
    border: 1px solid #9f7aea;
    background-color: #9f7aea;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

    #resetFilters:hover {
        background-color: #6348e0;
        border-color: #6348e0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

/*Global*/

/*Loading*/
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    text-align: center;
    pointer-events: none;
}

    #loadingOverlay .overlayBox {
        display: inline-block;
        background: #f4f6f8;
        padding: 70px 100px;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(0,0,0,0.3);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        pointer-events: auto;
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
        transform: translate(-50%, -60%); /* leicht nach oben verschoben für Animation */
    }

    #loadingOverlay.show .overlayBox {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    #loadingOverlay .spinner {
        border: 6px solid #f3f3f3;
        border-top: 6px solid #9f7aea;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        margin: 0 auto;
        animation: spin 1s linear infinite;
    }

    #loadingOverlay .overlayText {
        color: #333;
        font-size: 18px;
        margin-top: 10px;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/*Mark*/
mark {
    background: #e1f1fd;
    padding: 4px 2px;
    border-radius: 4px;
    font-style: italic;
    font-weight: 500;
}

/*Linie*/
.filter-line {
    border: none;
    height: 2px;
    background: #6495ED;
    margin: 2px -20px;
}
/*Sortierung*/
table.dataTable thead .sorting:before {
    content: "▲";
    font-size: 10px;
    color: black;
    padding: 1px 0px;
}

table.dataTable thead .sorting:after {
    content: "▼";
    color: black;
    font-size: 10px;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after {
    color: black; 
    opacity: 0.4 !important;
}


table.dataTable thead .sorting_asc:before {
    color: #6495ED;
    opacity: 1 !important;
}


table.dataTable thead .sorting_desc:after {
    color: #6495ED;
    opacity: 1 !important;
}
#reloadOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 9999;
}

.reload-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
}

/* Media-Queries */
@media (max-width: 1200px) {
    .dataTables_length {
        display: none;
    }

    .filter-box label {
        font-size: 15px !important;
        line-height: 3 !important;
    }

    .filter-box input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .radio-container label {
        line-height: 1.8;
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    mark {
        font-size: 15px;
        font-weight: 600;
    }

    .radio-container label {
        line-height: 1.8;
        display: block;
    }

    .radio-container {
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }

    .tooltip-name .info-text {
        max-width: 45vw; 
     
    }

    .filter-box {
        min-width: 25vw;
    }
}

@media (max-width: 768px) {


    .table-container {
        width: 95%;
        padding: 0 0;
         }
    
    .text-container {
        width: 90%;
        padding: 0 0;
        margin-right: 7%;
        margin-left: 3%;
    }
        p {
        text-align: left;
        padding: 0 0;
    }
    #filter-panel {
        width: 95%;
    }

    .filter-group > *,
    .year-fields > *,
    .top > * {
        width: 100%;
    }

    .top,
    .filter-group,
    .year-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .top {
        gap: 10px;
    }

    .filter-line {
        margin-bottom: 20px;
        margin-top: 8px;
    }


    #infoButton,
    #resetFilters,
    .yearFilter,
    .dropdown-filter button,
    .filter-btn {
        width: 100%;
    }

    .radio-container {
        border-bottom: 1px solid #ddd;
    }

        .radio-container label {
            line-height: 1.8;
            display: block;
        }

    .result-box {
        align-items: flex-end;
    }

    #filter-panel {
        gap: 0;
    }

    .filter-box {
        min-width: 70vw;
    }

    #infoPopup {
        min-width: unset;
        width: auto;
        max-width: 95vw;
        right: 0; /* verhindert Überlaufen nach rechts */
    }

    .tooltip-name .info-text {
        max-width: 70vw;
        /* zentriert mit Rand links */
    }

    mark {
        font-size: 15px;
        font-weight: 600;
    }

    .active-filters {
        margin-bottom: 10px;
    }
}