* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body, html {
    background: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 3%;
}

::-webkit-scrollbar {
    width: 14px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--background-color);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--accent-color-tr);
    border-radius: 15px;
    transition: all 2s ease;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
  }

/* Header */

.home, .login-container {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* END Header */

h1, h2 {
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

h1, h2, h3, h4, th, .nav-links, footer {
    user-select: none;
}

input::placeholder {
    user-select: none;
    -webkit-user-select: none; /* Chrome, Safari, Opera */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer */
}

.container {
    background: var(--container-bg);
    border-radius: 15px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: var(--accent-color);
    top: -60%;
    left: -60%;
    border-radius: 50%;
    filter: blur(100px);
    transform: rotate(0deg);
    animation: rotateAccent 20s linear infinite;
    opacity: 0.3;
}

.user-container, .admin-container, .table-container {
    max-width: 100%;
}

.table-container {
    overflow-x: auto;
}

.table-container td input, .table-container td select {
    margin-bottom: 0;
}

.datumTable {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
}

.PanelContainer {
    width: 100%;
    padding: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
}

.Panel {
    display: flex;
    background: #393939de;
    padding: 44px;
    border-radius: 18px;
    border: 1px solid #8080804f;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 50%;
    width: 40%;
}

.admin-container, .betriebe-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 76vh;
    min-width: 90%;
    max-width: 96%;
    height: 100%;
}

form.upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 22px 0;
}

input[type="text"], input[type="password"], input[type="email"], input[type="file"], select[name="role"], select[name="edit_role"] {
    padding: 15px;
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 20px;
    width: 100%;
    min-width: 106px;
    border: 1px solid #5b5b5b;
    transition: all var(--transition-speed);
}

input:focus {
    outline: none;
    box-shadow: 0 0 8px var(--primary-color);
}

select[name="role"]:focus {
    outline: none;
    box-shadow: 0 0 8px var(--primary-color);
}

select[name="role"] option {
    background: var(--container-bg);
    color: var(--text-color);
    padding: 10px;
}

form.upload-form button {
    width: 30vh;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin: 2px 0px;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.register-form button {
    width: 100%;
}

.delete-btn {
    background: transparent;
    color: #fff;
    margin: 0 10px;
}

.replace-btn {
    background: var(--primary-color);
    color: #fff;
}

button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(2px);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: var(--container-inner-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

thead {
    background: #565656;
}

th, td {
    padding: 15px 34px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-container th, .user-container td {
    padding: 18px 24px;
}

th {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
}

td {
    color: var(--text-color);
    background: var(--container-bg);
    position: relative;
    border: 1px solid var(--border-color);
}

tbody tr td, tbody tr:hover td {
    transition: background var(--transition-speed-tr) ease;
}

tbody tr:nth-child(even) td {
    background: #3b3b3b;
}

tbody tr:nth-child(2n) td {
    background: rgb(78, 78, 78);
}

tbody tr:hover td {
    background: var(--accent-color-tr);
    color: #fff;
}

td a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
    user-select: none;
}

td a:hover {
    color: #fff;
}

.action-form {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.action-form input[type="file"] {
    display: none;
}

.action-form input[type="file"] + label {
    display: inline-block;
    padding: 10px 15px;
    background: var(--input-bg);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.action-form input[type="file"] + label:hover {
    background: var(--accent-color);
    color: #fff;
}

.betreibertBody a, .adminBody a,
.betreibertBody button, .adminBody button {
    padding: 4px 20px;
}

tbody.adminBody td, .betreibertBody td {
    padding: 8px 14px;
    text-align: center;
}

td.count-td, td.data-betrieb {
    padding: 4px;
}

a.data-betrieb {
    cursor: pointer;
}

.searchContainer {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
}

input#searchInput {
    margin-bottom: 0;
}

.addedSearchText {
    margin: 6px 0px 16px 2px;
    font-size: .83em;
    color: #8b8b8b;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.523);
}

button#showAll, button#showAllCompanys {
    background: #c70b0b8f;
    border: 1px solid #ff0000cf;
    color: white;
    width: 202px;
    box-shadow: 0 0 22px -1px #ff0000bd;
}

td.data-betrieb div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px;
    align-items: center;
}

td.count-td div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

a.data-count, .data-betrieb div a {
    padding: 5px 14px;
    width: fit-content;
    user-select: none;
}

.navigation-links {
    margin: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.success-message, .error-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: fadeIn 0.5s ease-in;
}

.success-message {
    background: var(--success-color);
}

.error-message {
    background: var(--error-color);
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background-color: var(--container-inner-bg);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    user-select: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--container-inner-bg) transparent transparent transparent;
}

.tooltip button.insert-prefix {
    background-color: var(--button-bg);
    color: #fff;
    border: none;
    padding: 6px 10px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 14px;
    pointer-events: auto; /* Ermöglicht das Klicken auf den Button */
}

.tooltip button.insert-prefix:hover {
    background-color: var(--accent-color);
}

/* Copy-Icon */
.teilenummer-cell {
    position: relative;
    padding-right: 25px; 
}

.copy-icon {
    display: none;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #555;
    transition: color 0.3s;
}

.teilenummer-cell:hover .copy-icon {
    display: inline;
}

.copy-icon.copied {
    color: green;
}

/* Farbtabelle für die Betriebe */

a[data-name="46639"], button[data-name="46639"] {
    color: white;
    border: 1px solid rgba(11, 124, 11, 1.0);
    background: rgba(11, 124, 11, 0.5);
}

a[data-name="22118"], button[data-name="22118"] {
    color: white;
    border: 1px solid rgba(0, 128, 128, 1.0);
    background: rgba(0, 128, 128, 0.5);
}

a[data-name="46566"], button[data-name="46566"] {
    color: white;
    border: 1px solid rgba(93, 35, 185, 1.0);
    background: rgba(93, 35, 185, 0.5)
}

a[data-name="65595"], button[data-name="65595"] {
    color: white;
    border: 1px solid rgb(172, 127, 44);
    background: rgba(185, 127, 35, 0.5)
}

a[data-name="21913"], button[data-name="21913"] {
    color: white;
    border: 1px solid rgb(185, 35, 35);
    background: rgba(185, 35, 35, 0.5)
}

a[data-name="32522"], button[data-name="32522"] {
    color: white;
    border: 1px solid rgb(40, 35, 185);
    background: rgba(42, 35, 185, 0.5)
}

a[data-name="32948"], button[data-name="32948"] {
    color: white;
    border: 1px solid rgb(172, 35, 185);
    background: rgba(185, 35, 142, 0.5)
}

a[data-name="21316"], button[data-name="21316"] {
    color: white;
    border: 1px solid rgb(185, 177, 35);
    background: rgba(162, 185, 35, 0.5)
}

footer.footerCopyright {
    padding: 8px;
    margin-top: 30px;
}

.orange-text {
    color: orange !important;
}

.red-text {
    color: red !important;
    font-weight: bold !important;
}

#drop-zone {
    border: 2px dashed var(--primary-color);
    position: relative;
}

.drop-text {
    margin: 4px 0 22px 0;
    font-size: 1rem;
    color: var(--text-color);
}

#drop-zone.dragover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

form.text-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.text-form button {
    width: 100%;
    max-width: 300px;
    margin: 10px 0 0 0;
}

.text-form textarea {
    width: 100%;
    max-width: 540px;
    border-radius: 10px;
    padding: 8px;
    background: var(--background-color);
    color: white;
    outline: none;
}

#text-upload p {
    max-width: 85% !important;
}

.Panel p {
    margin: -18px 0 16px;
    text-align: center;
    max-width: 95%;
}

img.anleitungsgif {
    border-radius: 18px;
    width: 100%;
    margin-top: 4%;
}

.parent-badged {
    position: relative;
}

.badged {
    display: block;
    font-size: 1.6em;
    border-radius: 6px;
    padding: 6px 40px;
    position: absolute;
    left: -24px;
    top: 12px;
    transform: rotate(-36deg);
}

.green-badged {
    background: #127b12a3;
    border: 1px solid #04f504a8;
    border-style: dashed;
}

.red-badged {
    background: #a71717a3;
    border: 1px solid #f53904a8;
    border-style: dashed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity var(--transition-speed-tr) ease-in-out;
}

.modal.show {
    opacity: 1;
    animation: fadeIn var(--transition-speed-tr) forwards;
}

.modal.hide {
    opacity: 0;
    animation: fadeOut var(--transition-speed-tr) forwards;
}

.modal-content {
    width: 95%;
    max-width: 1480px;
    max-height: 90%;
    background-color: var(--container-bg);
    padding: 3% 5%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    color: var(--text-color);
    font-family: var(--font-family);
    position: relative;
    text-wrap: balance;
}

.modal-content h1, .modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-content h2 {
    text-align: left;
    margin-top: 50px;
}

.modal-content p {
    font-size: 1.1em;
    margin-bottom: 1rem;
    line-height: 40px;
}

ul.modalList {
    font-size: 1.2em;
    margin-left: 1.5rem;
}

ul.modalList li {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: color 0.3s;
}

ul.modalList li:hover {
    color: var(--accent-color);
}

/* Typing Animation */
#customSearchInput {
    font-size: 1.2em;
    padding: 10px;
    width: 100%;
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    margin-bottom: 0.2rem;
}

#searchTypewriter {
    font-family: var(--font-family);
    font-size: 1.2em;
    color: var(--accent-color);
    min-height: 2rem;
}

/* Button to close modal */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.2rem;
    background: rgba(169, 20, 20, 0.098);
    color: var(--accent-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--background-color);
    transition: color 1s ease, background 1s ease;
}

.modal-close-btn:hover {
    color: white;
    background: rgba(169, 20, 20, 0.493);
    transform: none;
}

div#exampleExplanation {
    font-size: .8em;
    color: #8b8b8b;
}

.hover-example, .example {
    background: #535353;
    border-radius: 12px;
    padding: 8px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background 1.5s ease;
}

.example {
    cursor: not-allowed;
}

.hover-example:hover {
    background: #292929;
}

/* Service */

.ServiceBtnContainer {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 20px 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes rotateAccent {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Große Tablets und kleine Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
        padding: 40px 30px;
    }

    .navbar.header {
        flex-direction: column;
        align-items: center;
        padding: 30px 10px;
        gap: 25px;
    }

    .logo img {
        max-width: 25vh;
    }

    h1, h2 {
        font-size: 2.2rem;
        margin-bottom: 25px;
    }

    .Panel {
        max-width: 50%;
        width: 45%;
        padding: 40px;
    }

    table th, table td {
        padding: 18px 30px;
    }

    a {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Tablets (max-width: 992px) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
        padding: 35px 25px;
    }

    .logo img {
        max-width: 20vh;
    }

    h1, h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .Panel {
        max-width: 100%;
        width: 100%;
        padding: 30px;
    }

    table th, table td {
        padding: 16px 25px;
        font-size: 0.95rem;
    }

    a {
        padding: 12px 18px;
        font-size: 0.95rem;
    }

    .PanelContainer {
        flex-direction: column;
        gap: 20px;
    }

    .navigation-links {
        gap: 15px;
    }
}

/* Kleine Tablets und große Smartphones (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .navbar.header {
        flex-direction: column;
        align-items: center;
        padding: 30px 10px;
    }

    .logo img {
        max-width: 18vh;
        margin-bottom: 15px;
    }

    h1, h2 {
        font-size: 1.6rem;
        margin-bottom: 18px;
    }

    .Panel {
        padding: 25px;
    }

    form.upload-form {
        padding: 5px;
    }

    input[type="text"], 
    input[type="password"], 
    input[type="email"], 
    input[type="file"], 
    select[name="role"], 
    select[name="edit_role"] {
        padding: 12px;
        font-size: 0.85rem;
    }

    button {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    table th, table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    a {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .navigation-links {
        flex-direction: column;
        gap: 10px;
    }

    .tooltip {
        font-size: 12px;
        padding: 8px 12px;
    }

    .tooltip button.insert-prefix {
        padding: 5px 8px;
        font-size: 12px;
    }

    .copy-icon {
        font-size: 14px;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
    }

    .nav-links a {
        display: flex;
        align-items: center;
    }
}

/* Handys (max-width: 576px) */
@media (max-width: 576px) {
    .container {
        padding: 25px 10px;
    }

    .navbar.header {
        align-items: center;
        padding: 30px 8px;
        justify-content: flex-start;
        flex-direction: column;
    }

    .nav-links a {
        width: 44%;
        text-align: center;
    }

    .logo img {
        max-width: 25vh;
        margin-bottom: 20px;
    }

    h1, h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .PanelContainer {
        flex-direction: column;
        gap: 15px;
    }

    .Panel {
        padding: 18px;
        width: 100% !important;
        max-width: 100% !important;
    }

    form.upload-form {
        padding: 5px;
    }

    input[type="text"], 
    input[type="password"], 
    input[type="email"], 
    input[type="file"], 
    select[name="role"], 
    select[name="edit_role"] {
        padding: 12px;
        font-size: 0.85rem;
        margin: 8px 0;
    }

    button {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    table th, table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    a {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .navigation-links {
        flex-direction: column;
        gap: 10px;
    }

    .tooltip {
        font-size: 12px;
        padding: 8px 12px;
    }

    .tooltip button.insert-prefix {
        padding: 5px 8px;
        font-size: 12px;
    }

    .copy-icon {
        font-size: 14px;
    }
}

/* Tabellenresponsive für kleine Bildschirme (bis 600px) */
@media (max-width: 600px) {
    body, html {
        margin: 0;
        padding: 6px;
    }

    .nav-links a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 80%;
    }
}