.events-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}


/* ================================
   Kopfzeile
   ================================ */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 1rem;
    margin-bottom: 1rem;
}

.calendar-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-header h1 {
    margin: 0 0 0 1rem;

    font-size: 1.5rem;
    font-weight: 600;
}


/* Navigation */

.calendar-nav-button,
.calendar-today-button {
    height: 38px;

    border: 1px solid #aaa;
    border-radius: 6px;

    background: white;

    cursor: pointer;
}

.calendar-nav-button {
    width: 38px;

    font-size: 1.5rem;
}

.calendar-today-button {
    padding: 0 1rem;

    font-size: 0.95rem;
}

.calendar-nav-button:hover,
.calendar-today-button:hover {
    background: #f2f2f2;
}


/* Auswahl */

.calendar-header select {
    height: 38px;

    padding: 0 0.7rem;

    border: 1px solid #aaa;
    border-radius: 6px;

    background: white;

    font-size: 0.95rem;
}


/* ================================
   Kalender
   ================================ */

.calendar-container {
    width: 100%;

    border: 1px solid #cfcfcf;
    border-radius: 6px;

    overflow: hidden;

    background: white;
}


/* ================================
   Wochentage
   ================================ */

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays > div {
    box-sizing: border-box;

    padding: 0.7rem;

    text-align: center;

    font-weight: 600;
    font-size: 0.85rem;

    color: #555;

    border-right: 1px solid #d5d5d5;
}

.calendar-weekdays > div:last-child {
    border-right: none;
}


/* ================================
   Tage
   ================================ */

.calendar {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    width: 100%;
}

.calendar-day {
    box-sizing: border-box;

    min-width: 0;
    min-height: 130px;

    padding: 0.5rem;

    background: white;

    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;

    overflow: hidden;
}


/*
 * Jeder 7. Tag ist der Sonntag
 */

.calendar-day:nth-child(7n) {
    border-right: none;
}


/* Leere Tage außerhalb des Monats */

.calendar-day.empty {
    background: #f8f8f8;
}


/* Wochenende */

.calendar-day.weekend {
    background: #fcfcfc;
}


/* ================================
   Tagesnummer
   ================================ */

.calendar-day-number {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    height: 28px;

    margin-bottom: 0.25rem;

    font-size: 0.85rem;
    font-weight: 500;

    color: #555;
}


/* Heute */

.calendar-day.today {
    background: #f1f6ff;
}

.calendar-day.today .calendar-day-number {
    display: flex;

    justify-content: center;
    align-items: center;

    width: 28px;
    height: 28px;

    margin-left: auto;

    border-radius: 50%;

    font-weight: 700;
}


/* ================================
   Veranstaltungen
   ================================ */

.calendar-event {
    display: block;

    width: 100%;
    box-sizing: border-box;

    margin-bottom: 4px;

    padding: 4px 6px;

    border-radius: 4px;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    text-decoration: none;

    font-size: 0.78rem;

    cursor: pointer;
}

.calendar-event:hover {
    opacity: 0.8;
}

.calendar-event-time {
    margin-right: 4px;

    font-size: 0.7rem;

    opacity: 0.75;
}

.calendar-event-title {
    font-weight: 500;
}

.calendar-event.cancelled {
    opacity: 0.5;

    text-decoration: line-through;
}


/* ================================
   Liste
   ================================ */

.events-list-view {
    width: 100%;

    border: 1px solid #d0d0d0;
    border-radius: 6px;

    overflow: hidden;

    background: white;
}


/* ================================
   Jahresansicht
   ================================ */

.year-calendar {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 1rem;

    padding: 1rem;
}

.year-month {
    border: 1px solid #d0d0d0;
    border-radius: 6px;

    padding: 1rem;

    background: white;
}

.year-month h3 {
    margin: 0 0 0.75rem;
}


/* ================================
   Mobile
   ================================ */

@media (max-width: 700px) {

    .calendar-header {
        flex-direction: column;

        align-items: stretch;
    }

    .calendar-header-left {
        justify-content: center;
    }

    .calendar-header-right {
        justify-content: center;
    }

    .calendar-header h1 {
        font-size: 1.2rem;
    }

    .calendar-day {
        min-height: 90px;

        padding: 0.25rem;
    }

    .calendar-weekdays > div {
        padding: 0.5rem 0.2rem;

        font-size: 0.75rem;
    }

    .calendar-event {
        font-size: 0.65rem;

        padding: 3px;
    }

    .calendar-event-time {
        display: none;
    }

    .year-calendar {
        grid-template-columns: 1fr;
    }
}