/* Primäre Farben */
:root {
    --farbe-weiss: #ffffff;
    --farbe-dunkelgrau: #333333;
    --farbe-dunkelblau: #cce5ff;
    --farbe-hellblau: #e6f0ff;
    --farbe-hellgrau: #e6e6e6;
    --farbe-sehr-hellgrau: rgba(242, 242, 242, 0.7);
    --farbe-hellgruen: #C6E0B4;
    --farbe-sehr-hellgruen: rgba(198, 224, 180, 0.7);
    --farbe-hellorange: #f8cbad;
    --farbe-sehr-hellorange: rgba(248, 203, 173, 0.7);
    --farbe-hellgelb: #FFE699;
    --farbe-sehr-hellgelb: rgba(255, 230, 153, 0.7);
    --farbe-hellviolett: #DBDBDB;
    --farbe-sehr-hellviolett: rgba(219, 219, 219, 0.7);
    --farbe-hintergrund: #f0f0f0;
    --farbe-text: #333333;
    --farbe-button-background: #333333;
    --farbe-button-hover: rgba(79, 79, 79, 0.8);
    --farbe-rot: rgba(246, 50, 50, 0.74);
}

/* Allgemeine Stile */
body {
    font-family: Arial, sans-serif;
    background-color: var(--farbe-hintergrund);
    text-align: center;
    padding: 0;
    margin: 0;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

h1 {
    color: var(--farbe-text);
}

h2 {
    margin-top: 50px;
}

footer {
    background-color: var(--farbe-dunkelgrau);
    color: var(--farbe-weiss);
    text-align: center;
    justify-content: space-between;
    padding: 10px 0;
    position: page;
    bottom: 0;
    width: 100%;
    margin-top: 50px;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--farbe-dunkelgrau);
    padding: 7px;
    z-index: 1000;
}

.menu-icon {
    font-size: 30px;
    color: var(--farbe-weiss);
    cursor: pointer;
    margin-left: 15px;
    margin-top: -6px;
}

.logo {
    height: 60px;
    margin-right: 20px;
}

.nav-text {
    color: var(--farbe-weiss);
    font-size: 20px;
    text-align: center;
    flex-grow: 1;
    margin-left: 15px;
}

body {
    padding-top: 60px;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.menu li {
    margin: 0 5px;
}

.menu a {
    color: var(--farbe-weiss);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
}

/* Standardmäßig sind mobile-only-Elemente ausgeblendet */
.mobile-only {
    display: none;
}

@media (max-width: 600px) {

    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-block !important;
    }

    /* Week buttons styles */
    .week-buttons {
        display: flex;
        gap: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
    }

    .menu {
        display: none;
        flex-direction: column;
    }

    .menu-icon {
        display: block;
        margin-left: 5px;
    }

    .logo {
        height: 50px !important;
        margin-right: 15px !important;
    }

    #menu-toggle:checked + .menu-icon + .menu {
        display: flex;
    }

    .dienstplan {
        overflow-x: auto; /* Ermögliche horizontales Scrollen innerhalb der Tabelle */
        right: 0;
    }

    .dienstplan th, .dienstplan td {
        font-size: 9px; /* Schriftgröße reduzieren */
        width: 100vw;
    }

    .names-modal {
        bottom: 0;
        width: 100vw; /* Volle Breite */
        overflow-y: auto;
        top: 60% !important;
    }

    .names-modal-content {
        width: 90vw !important;
        overflow-y: auto;
        top: 60% !important;
        margin-bottom: 75px !important;
        max-height: 35% !important; /* Maximalhöhe für den Inhalt */
    }

    hr {
        border: 0;
        border-top: 100px solid #333; /* Dicke und Farbe der Linie */
        width: 100% !important; /* Volle Breite des Viewports */
        margin-top: 100px; /* Entfernt jeglichen Abstand */
        overflow-x: hidden;
    }

    #tables-container {
        transition: none !important;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: -100%;
    width: 240px;
    height: 100%;
    background-color: var(--farbe-dunkelgrau);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    z-index: 2000;
}

.modal-content {
    color: var(--farbe-weiss);
    padding: 20px;
    z-index: 2001;
}

.modal ul {
    list-style: none;
    padding: 0;
}

.modal ul li {
    margin: 20px 0;
}

.modal ul li a {
    color: var(--farbe-weiss);
    text-decoration: none;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    cursor: pointer;
    transition: 0.5s;
    z-index: 2002;
}

/* Tabellen */
.dienstplan {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    word-wrap: break-word;
    white-space: wrap;
    overflow-wrap: break-word;
}

.dienstplan th:first-child, .dienstplan td:first-child {
    width: 100px;
}

.dienstplan th, .dienstplan td {
    border: 1px solid #000000;
    padding: 8px;
    margin: 0;
}

.dienstplan td {
    max-width: 100px;
}

.dienstplan td input {
    width: 100% !important; /* Make the input field take the full width of the cell */
    height: 100% !important; /* Make the input field take the full height of the cell */
    font-size: 14px !important; /* Adjust the font size */
    border: none !important; /* Remove the border */
    padding: 0 !important; /* Remove padding */
    background: transparent !important; /* Make the background transparent */
    text-align: center !important; /* Center align the text */
    outline: none !important; /* Entfernt den Fokusrahmen */
    box-shadow: none !important; /* Entfernt Schatten, falls vorhanden */
}

/* Tabellenfarben */
.table-mercedes thead {
    background-color: var(--farbe-hellgrau);
}

.table-mercedes tbody tr {
    background-color: var(--farbe-sehr-hellgrau);
}

.table-bmw thead {
    background-color: var(--farbe-dunkelblau);
}

.table-bmw tbody tr {
    background-color: var(--farbe-hellblau);
}

.table-porsche thead {
    background-color: var(--farbe-hellgruen);
}

.table-porsche tbody tr {
    background-color: var(--farbe-sehr-hellgruen);
}

.table-team-mobil thead {
    background-color: var(--farbe-hellorange);
}

.table-team-mobil tbody tr {
    background-color: var(--farbe-sehr-hellorange);
}

.table-backoffice thead {
    background-color: var(--farbe-hellgelb);
}

.table-backoffice tbody tr {
    background-color: var(--farbe-sehr-hellgelb);
}

.table-urlaub thead {
    background-color: var(--farbe-hellviolett);
}

.table-urlaub tbody tr {
    background-color: var(--farbe-sehr-hellviolett);
}

#tables-container {
    transition: margin-right 0.5s;
}

/* Week buttons styles */
.week-buttons {
    font-size: 30px !important;
    display: flex;
    gap: 10px;
    margin-left: 180px;
    margin-right: 180px;
}

.week-buttons button:hover {
    background-color: rgba(79, 79, 79, 0.8); /* Lighter blue on hover */
}

/* Modal Styles */
.names-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    height: calc(100vh - 75px);
    background-color: var(--farbe-hintergrund);
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    overflow-y: auto;
}


.names-modal-content {
    padding: 20px;
    margin-bottom: 75px;
}

.names-modal .close {
    position: absolute;
    top: 10px;
    font-size: 32px;
    cursor: pointer;
}

hr {
    border: 0;
    border-top: 100px solid #333; /* Dicke und Farbe der Linie */
    width: 150vw; /* Volle Breite des Viewports */
    margin-top: 100px; /* Entfernt jeglichen Abstand */
}

#name-search {
    width: 90%;
    padding: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#names-container ul {
    list-style: none;
    padding: 0;
}

#names-container li {
    padding: 15px;
    border-right: none;
    border-left: none;
    border-top: none;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    height: 80%;
}

.name-item.active {
    background-color: rgba(17, 87, 138, 0.53);
}

.selected {
    border: 3px solid blue;
}

.highlighted {
    background-color: rgba(115, 115, 115, 0.5);
}

/* Button */
button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--farbe-button-background);
    color: var(--farbe-weiss);
    border: none;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--farbe-button-hover);
}


.settings-table {
    width: auto; /* Adjust the width as needed */
    margin: 20px auto; /* Center the table with some margin */
    border-collapse: collapse; /* Collapse borders */
    text-align: center;
}

#settings-container h2 {
    margin-bottom: 20px; /* Adjust the value as needed */
    text-align: center;
}

.settings-table th, .settings-table td {
    border: 2px solid #000000; /* Add border to cells */
    padding: 0; /* Add padding to cells */
    height: 25px;
    text-align: center;
}

.settings-table .standorte-entfernen {
    width: 10%;
}


.dienstplan td.category-cell {
    font: 32px bold Arial, sans-serif; /* Adjust the font size and weight */
    text-align: center; /* Center align the text */
    margin: 0;
}

.dienstplan th.category-cell {
    margin: 0;
}

.settings-table th {
    background-color: #f2f2f2; /* Light grey background for headers */
    text-align: center;
}

.settings-table tbody tr:nth-child{
    background-color: #ffffff; /* Light grey background for even rows */
    font-size: 16px; /* Adjust the font size */
    text-align: center;
}

.settings-table .category-row {
    font-weight: bold;
    background-color: #e0e0e0; /* Light grey background for category rows */
    text-align: center;
}

#categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.category-section {
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 180px;
    margin-top: 50px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto; /* Make the name list scrollable */
    max-height: 300px; /* Set a max height for the name list */
}

.add-name-btn {
    margin-top: 10px;
    padding: 5px 10px;
    font-size: 20px;
    cursor: pointer;
    background-color: #333;
    color: white;
    border: none;
    width: 100%;
    height: 40px;
    text-align: center;
    line-height: 30px;
    align-self: center; /* Center the button horizontally */
}

.category-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.name-text {
    flex-grow: 1;
    text-align: center; /* Center align the text */
}

.delete-icon {
    cursor: pointer;
    margin-left: 10px;
    color: #000000;
}

.delete-icon:hover {
    color: #ff0000;
}


.add-name-btn:hover {
    background-color: rgba(79, 79, 79, 0.8);
}

.table-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.table-wrapper h3 {
    margin-bottom: 10px;
}

.settings-table {
    width: 50%;
    border-collapse: collapse;
}

.settings-table th, .settings-table td {
    border: 1px solid #000000;
    padding: 8px;
}

.settings-table th {
    background-color: #f2f2f2;
}

.add-location-btn {
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    background-color: #333;
    color: white;
    border: none;
    transition: background-color 0.3s;
    margin-bottom: 25px;
}

.add-location-btn:hover {
    background-color: rgba(79, 79, 79, 0.8);
}

.delete-location-btn {
    color: black;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

.delete-location-btn:hover {
    color: red;
    background-color: transparent;
}

.delete-icon-btn {
    position: absolute;
    margin-left: 120px;
    top: -20px;
    right: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    color: #000000;
}

.delete-icon-btn button {
    width : 0;
}

.delete-icon-btn:hover {
    color: #ff0000;
    background-color: transparent;
}

#delete-category-btn .delete-icon-btn {
    position: absolute;
    padding-left: 120px;
    top: -15px;
    right: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #000000;
}

#delete-category-btn .delete-icon-btn:hover {
    color: #ff0000;
    background-color: transparent;
}

.context-menu {
    position: absolute;
    background-color: var(--farbe-dunkelgrau);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 10px;
    width: 150px;
}

.context-menu button {
    padding: 10px;
    font-size: 16px;
    text-align: left;
    background: none;
    color: var(--farbe-weiss);
    border: none;
    width: 100%;
    cursor: pointer;
}

/* Desktop Version */
@media (min-width: 601px) {
    .menu {
        display: flex;
    }

    body {
        padding-top: 80px;
    }
}
