/* Event Kalender – Wochen- & Jahresansicht (Shortcode [event_calendar]) */

.ecs-calendar {
    max-width: 1100px;
    margin: 0 auto;
    color: inherit;
}

.ecs-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: var(--gap-s, 16px);
}

.ecs-toggle-btn {
    padding: 8px 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    background: #f5f5f5;
}

.ecs-toggle-btn.is-active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.ecs-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--gap-s, 16px);
    flex-wrap: wrap;
}

.ecs-nav a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    border-radius: 4px;
}

.ecs-nav a:hover {
    background: #eee;
}

.ecs-nav-title {
    font-weight: 600;
    font-size: 1.1em;
}

.ecs-nav-today {
    border: 1px solid #ccc;
}

/* Wochenansicht */
.ecs-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.ecs-day-col {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ecs-day-col.is-today {
    border-color: #222;
    box-shadow: 0 0 0 1px #222 inset;
}

.ecs-day-head {
    background: #fff;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    font-weight: 600;
}

.ecs-day-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.ecs-event {
    display: block;
    background: #fff;
    color: #22305a;
    font-size: 0.8em;
    padding: 4px 6px;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ecs-event:hover {
    background: #dbe2ff;
}

.ecs-event.is-multi {
    background: #fff1de;
    color: #6a4400;
}

.ecs-no-events {
    color: #bbb;
    font-size: 0.8em;
}

/* Jahresansicht */
.ecs-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--gap-m, 18px);
}

.ecs-month-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.ecs-month-daynames {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7em;
    color: #999;
    margin-bottom: 2px;
}

.ecs-month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ecs-blank {
    visibility: hidden;
}

.ecs-year-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-size: 0.75em;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.ecs-year-day:hover {
    background: #eee;
}

.ecs-year-day.has-events {
    background: #fff;
    font-weight: 600;
    color: #22305a;
}

.ecs-year-day.is-today {
    outline: 2px solid #222;
}

@media (max-width: 700px) {
    .ecs-week-grid {
        grid-template-columns: repeat(7, minmax(90px, 1fr));
        overflow-x: auto;
    }
}