body {
    font-family: Arial, sans-serif;
    margin: 20px;
    line-height: 1.6;
    background-color: #f0f0f0;
}

h1 {
    margin-bottom: 20px;
    color: #333;
}

nav {
    margin-bottom: 20px;
}

/* Style für die Datums-Navigation */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.date-display {
    font-size: 18px;
    cursor: pointer;
}

.nav-button {
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
}

/* Verstecke den Date-Picker und mache ihn absolut positioniert */
#datePicker {
    position: absolute;
    z-index: 100; /* Höherer z-index, um über anderen Inhalten zu erscheinen */
    visibility: hidden;
    opacity: 0;
}

/* Style für die Toggle-Buttons */
.toggle-button-on {
    background-color: green;
    color: white;
}
.toggle-button-off {
    background-color: red;
    color: white;
}

.hidden {
    display: none;
}

.audio-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 10px 0;
}
.audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}
.audio-controls button {
    background-color: #4c5caf;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.audio-controls button:hover {
    background-color: #4052ab;
}
.progress-bar {
    flex-grow: 1;
    height: 20px; /* erhöht, um Platz für die Zeit anzeige zu schaffen */
    background-color: #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
}
.progress {
    height: 100%;
    background-color: #007bff;
    border-radius: 5px;
    width: 0;
}
.progress-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
    pointer-events: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #4c5caf;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-right: 10px;
}

.button.logout {
    background-color: #af4c4c;
}

.button.logout:hover {
    background-color: #913737;
}
.button:hover {
    background-color: #4052ab;
}

.mails-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mail-header a {
    color: white;
    text-decoration: none;
}

.mail-header a:hover {
    color: lightgray; /* Optionaler Hover-Effekt */
}

.mail-footer {
    font-size: 0.9em;
    color: #666;
    padding: 10px;
    border-top: 1px solid #ddd;
    margin-top: 10px;
    text-align: right;
    font-style: italic;
}

.mail-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mail-card.odd {
    background-color: #f9f9f9;
}

.mail-card.even {
    background-color: #f9f9f9;
}

.mail-card.completed.even {
    background-color: #64b267;
}

.mail-card.completed.odd {
    background-color: #64b267;
}


.mail-header h2 {
    margin: 0;
    font-size: 1.2em;
}

.mail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #4c5caf;
    color: white;
    padding: 10px 15px;
}

.header-content {
    flex-grow: 1;
}

.header-actions {
    flex-shrink: 0;
}

.toggle-completed {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.toggle-completed:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.completed .toggle-completed {
    color: #4CAF50;
}
.mail-content {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.attachment, .comment {
    flex: 1 1 100%;
}

.transcription {
    font-style: italic;
    padding: 10px 15px;
    background-color: rgba(0,0,0,0.05);
    margin-top: 10px;
}

audio {
    width: 100%;
}

textarea {
    width: 100%;
    height: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

button {
    padding: 8px 12px;
    background-color: #4c5caf;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
}

button:hover {
    background-color: #4052ab;
}

@media screen and (max-width: 768px) {
    .mail-content {
        flex-direction: column;
    }

    .attachment, .comment, .completed {
        flex: 1 1 100%;
    }
}
