/* Homepage upcoming events (filterable list) */

.event-board {
    margin-top: 1.25rem;
}

.event-filter-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.event-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
}

.event-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    min-width: 6rem;
    padding: 0.32rem 0.45rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    color: #fff;
    font-family: inherit;
    background: var(--color-accent);
    text-align: center;
    box-sizing: border-box;
}

.event-chip-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.event-chip-name {
    font-weight: 600;
}

.event-chip:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.event-chip[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--color-bg, #fff), 0 0 0 4px currentColor;
}

.event-chip-all {
    background: var(--color-card-bg, #fff);
    color: var(--color-text, #333);
    border-color: var(--color-card-border, #ccc);
}

.event-chip-thistle { background: #D50000; }
.event-chip-walk { background: #1565c0; }
.event-chip-tree { background: #0B8043; }
.event-chip-pub { background: #ef6c00; }

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 28rem;
    overflow-y: auto;
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius);
    background: var(--color-card-bg);
    box-shadow: var(--card-shadow);
}

.event-item {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    gap: 0.35rem 0.9rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-card-border);
    align-items: start;
}

.event-item:last-child {
    border-bottom: none;
}

.event-when {
    font-size: 0.88rem;
    line-height: 1.35;
}

.event-time {
    display: block;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

.event-main {
    min-width: 0;
}

.event-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
    line-height: 1.35;
}

.event-location {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.event-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 4.4rem;
    margin-top: 0.15rem;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    background: #607d8b;
    white-space: nowrap;
}

.event-type-thistle { background: #D50000; }
.event-type-walk { background: #1565c0; }
.event-type-tree { background: #0B8043; }
.event-type-pub { background: #ef6c00; }
.event-type-other { background: #607d8b; }

.event-empty,
.event-loading,
.event-error {
    padding: 1.25rem 1rem;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .event-item {
        grid-template-columns: 1fr auto;
    }
    .event-when {
        grid-column: 1 / -1;
    }
}
