/* css/style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

h1 {
    margin-top: 0;
}

main {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.date-selector, .job-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

input[type="date"], input[type="time"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.job-list {
    margin-top: 20px;
}

.job-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 5px solid #007bff; /* Standardfarbe für Vor-Ort */
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.job-item.werkstatt {
    border-left-color: #28a745; /* Grüne Farbe für Werkstatt-Aufträge */
}
.job-item.abgeschlossen {
    border-left-color: #6c757d; /* Grau für Abgeschlossen */
    opacity: 0.7;
}
.job-item.abgesagt {
    border-left-color: #dc3545; /* Rot für Abgesagt */
    opacity: 0.6;
    text-decoration: line-through;
}


.job-details {
    flex-grow: 1;
    min-width: 60%;
}

.job-details h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #007bff;
    font-size: 1.2em;
}

.job-details p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #555;
}

.job-details .time {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.job-actions {
    display: flex;
    gap: 5px;
}

.job-actions button {
    padding: 8px 12px;
    font-size: 0.9em;
}

.job-actions .edit-btn {
    background-color: #ffc107;
    color: #333;
}
.job-actions .edit-btn:hover {
    background-color: #e0a800;
}

.job-actions .delete-btn {
    background-color: #dc3545;
}
.job-actions .delete-btn:hover {
    background-color: #c82333;
}

.noJobsMessage {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    border: 1px dashed #ced4da;
    border-radius: 5px;
    margin-top: 30px;
}
.hidden {
    display: none;
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

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

#jobForm label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

#jobForm input[type="text"],
#jobForm input[type="tel"],
#jobForm input[type="email"],
#jobForm input[type="date"],
#jobForm input[type="time"],
#jobForm input[type="number"],
#jobForm select,
#jobForm textarea {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* padding in width */
}

#jobForm input[type="number"] {
    width: auto; /* For number inputs like duration */
}

#jobForm small {
    display: block;
    margin-top: -5px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.85em;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
}

.form-actions .cancel-button {
    background-color: #6c757d;
}
.form-actions .cancel-button:hover {
    background-color: #5a6268;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .job-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .job-details, .job-actions {
        width: 100%;
    }
    .job-actions {
        justify-content: flex-end;
    }
}