/* Import für die Schriften */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Raleway:wght@400;500&display=swap');

/* --- Allgemeine Stile & Admin-Seite (unverändert) --- */
body { font-family: 'Raleway', sans-serif; background-color: #f4f4f4; color: #333; margin: 0; padding: 20px; }
.container { max-width: 800px; margin: 0 auto; background: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
body.admin-page h1 { font-family: 'Great Vibes', cursive; color: #5d7a71; font-size: 3.5em; text-align: center; margin-bottom: 20px; }
body.admin-page form { display: flex; gap: 10px; margin-bottom: 20px; }
body.admin-page input { flex-grow: 1; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
body.admin-page button, .preview-link, .delete-btn { padding: 10px 15px; border: none; background-color: #5d7a71; color: white; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 1em; transition: background-color 0.2s; }
.delete-btn { background-color: #c06c7a; }
.logout-btn { float: right; background-color: #aaa; padding: 5px 10px; color: white; text-decoration: none; border-radius: 4px; font-size: 0.9em; }
.info { background-color: #f2f5f4; border-left: 4px solid #5d7a71; padding: 15px; margin: 20px 0; border-radius: 4px; }
.calendar-list ul { list-style: none; padding: 0; }
.calendar-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #eee; }
.login-box { text-align: center; padding: 40px 0; }
.error-message { color: #c06c7a; }

/* --- Druckbare Agenda-Seite (generation.php) --- */
body.agenda-page { background-color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-landscape { width: 29.7cm; height: 21cm; margin: 0 auto; display: flex; flex-direction: column; box-sizing: border-box; background: white; padding: 0.8cm; }
.agenda-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 12px; margin-bottom: 8px; border-bottom: 1px solid #d0dae4; background-color: #eaf4fd; border-radius: 5px; flex-shrink: 0; }
.agenda-header .title-date { font-family: 'Great Vibes', cursive; font-size: 1.8em; color: #4a6a8a; }
.agenda-header .quote { font-family: 'Great Vibes', cursive; font-size: 1.2em; color: #5a7a9a; text-align: right; max-width: 60%; }
.agenda-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 8px; flex-grow: 1; overflow: hidden; }
.day-box { background-color: #fff; padding: 5px 8px; border: 1px solid #f0f0f0; display: flex; flex-direction: column; overflow: hidden; }
.day-box .day-header { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 2px; border-bottom: 1px solid #f5f5f5; margin-bottom: 3px; flex-shrink: 0; }
.day-box h2 { font-family: 'Raleway', sans-serif; font-weight: 500; font-size: 0.75em; color: #666; margin: 0; }
.day-box .date { font-size: 0.9em; color: #b5b5b5; font-weight: 400; }
.events-container { flex-grow: 1; overflow: hidden; font-size: 7.5pt; /* Standard-Schriftgrösse */ line-height: 1.5; }
.event { margin: 0; padding: 1px 3px; border-radius: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event.all-day { background-color: #f7f7f7; }
.event.timed { background-color: #eaf4fd; margin-top: 2px; }
.event .time { font-weight: bold; margin-right: 4px; }
hr.event-separator { border: 0; border-top: 1px dotted #e0e0e0; margin: 2px 0; }
.day-box.todos { background-color: #f8f8f8; }

/* Styles für das Zwei-Spalten-Layout der ganztägigen Events */
.all-day-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 8px; /* Nur Spaltenabstand */
}

/* --- Dynamische Schriftgrössen basierend auf der Anzahl der Termine --- */
.events-container.events-font-medium {
    font-size: 6.5pt;
    line-height: 1.4;
}

.events-container.events-font-small {
    font-size: 4.5pt;
    line-height: 1.3;
}

@media print {
    body, html { margin: 0; padding: 0; }
    @page { size: A4 landscape; margin: 0; }
    .a4-landscape { padding: 0.8cm; width: 29.7cm; height: 21cm; box-shadow: none; box-sizing: border-box; }
}
/* --- Lade-Animation --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #a8e0ff, #c3aed6, #fccde2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    text-align: center;
}
.loader-content .animation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}
.loader-content .block {
    width: 20px;
    height: 50px;
    margin: 0 5px;
    background: white;
    border-radius: 4px;
    animation: organize 1.2s infinite ease-in-out;
}
.loader-content .block:nth-child(2) { animation-delay: -1.0s; }
.loader-content .block:nth-child(3) { animation-delay: -0.8s; }
.loader-content .block:nth-child(4) { animation-delay: -0.6s; }

@keyframes organize {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20% { transform: scaleY(1.0); }
}
.loader-message {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5em;
    color: white;
    margin-top: 30px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}