/* Events list (GatherPress archive + event category archives): title band, filters, list and calendar views. */
.wpn-events-page {
	--wpn-blue: #1e5f99;
	--wpn-ink: #1d2327;
	--wpn-mute: #50575e;
	--wpn-line: #dcdfe3;
	--wpn-soft: #f3f6f9;
	margin-block: 0;
	color: var(--wpn-ink);
}
.wpn-events-page > * { margin-block: 0; }

/* View switch: two hidden radios drive the toggle with CSS alone (no script). */
.wpn-view-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; overflow: hidden; }
.wpn-view--cal { display: none; }
#wpn-view-cal:checked ~ .wpn-view--cal { display: block; }
#wpn-view-cal:checked ~ .wpn-view--list { display: none; }

/* Title band */
.wpn-events-band { padding: 64px 32px 36px; background: var(--wpn-soft); border-bottom: 1px solid #e3e6ea; }
.wpn-events-band > * { margin-block: 0; }
.wpn-events-head { gap: 24px; align-items: flex-end; margin-bottom: 28px; }
.wpn-events-intro { max-width: 680px; }
.wpn-events-title { margin: 0 0 12px; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.wpn-events-lede { margin: 0; font-size: 1.15rem; line-height: 1.55; color: #3c434a; }

.wpn-view-toggle { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--wpn-line); border-radius: 12px; }
.wpn-view-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; color: #3c434a; cursor: pointer; }
#wpn-view-list:checked ~ .wpn-events-band .wpn-view-btn--list,
#wpn-view-cal:checked ~ .wpn-events-band .wpn-view-btn--cal { background: var(--wpn-blue); color: #fff; }
#wpn-view-list:focus-visible ~ .wpn-events-band .wpn-view-btn--list,
#wpn-view-cal:focus-visible ~ .wpn-events-band .wpn-view-btn--cal { outline: 3px solid #9ec2e6; outline-offset: 2px; }

/* Type filter chips (links to the category archives) */
.wpn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wpn-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid #c3c4c7; border-radius: 999px; background: #fff; color: var(--wpn-ink); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.wpn-chip:hover { border-color: var(--wpn-ink); }
.wpn-chip__dot { width: 10px; height: 10px; border-radius: 50%; background: #50575e; }
.wpn-chip--office-hours .wpn-chip__dot { background: #2a74b5; }
.wpn-chip--meetup .wpn-chip__dot { background: #1e7b3a; }
.wpn-chip--workshop .wpn-chip__dot { background: #c47a12; }
body.post-type-archive-gatherpress_event .wpn-chip--all,
body.tax-wpn_event_category.term-office-hours .wpn-chip--office-hours,
body.tax-wpn_event_category.term-meetup .wpn-chip--meetup,
body.tax-wpn_event_category.term-workshop .wpn-chip--workshop { background: var(--wpn-ink); border-color: var(--wpn-ink); color: #fff; }
.wpn-chip:focus-visible { outline: 3px solid #9ec2e6; outline-offset: 2px; }

/* Views */
.wpn-view { padding: 40px 32px 96px; }
.wpn-view > * { margin-block: 0; }

/* List rows. Colour comes from the event's category class; blue is the fallback. */
.wpn-event-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wpn-event-rows > li { --wpn-bg: #e6f0f9; --wpn-fg: #135e96; margin: 0; }
.wpn-event-rows > li.wpn_event_category-meetup { --wpn-bg: #e6f4ea; --wpn-fg: #1e6b34; }
.wpn-event-rows > li.wpn_event_category-workshop { --wpn-bg: #fcf0e1; --wpn-fg: #8a4b00; }
.wpn-event-rows > li.wpn_event_category-community { --wpn-bg: #f4f1fa; --wpn-fg: #5b3e96; }
.wpn-event-row { gap: 24px; padding: 22px 26px; background: #fff; border: 1px solid var(--wpn-line); border-radius: 14px; }
.wpn-date-tile { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; padding: 10px 0; border-radius: 12px; background: var(--wpn-bg); color: var(--wpn-fg); text-align: center; }
.wpn-date-tile > * { margin: 0; }
.wpn-date-tile .wp-block-gatherpress-event-date { font-weight: 700; line-height: 1.05; }
.wpn-tile-dow { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.wpn-tile-day { font-size: 2rem; }
.wpn-tile-mon { font-size: 0.75rem; text-transform: uppercase; }
.wpn-event-body { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wpn-event-body > * { margin: 0; }
.wpn-event-titlerow { gap: 10px; }
.wpn-event-name { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.wpn-event-name a { color: var(--wpn-ink); text-decoration: none; }
.wpn-event-name a:hover { text-decoration: underline; }
.wpn-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wpn-pills a { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--wpn-bg, #e6f0f9); color: var(--wpn-fg, #135e96); font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.wpn-pills a.wpn-cat-office-hours { background: #e6f0f9; color: #135e96; }
.wpn-pills a.wpn-cat-meetup { background: #e6f4ea; color: #1e6b34; }
.wpn-pills a.wpn-cat-workshop { background: #fcf0e1; color: #8a4b00; }
.wpn-pills a.wpn-cat-community { background: #f4f1fa; color: #5b3e96; }
.wpn-event-meta { gap: 6px 18px; font-size: 0.95rem; color: #3c434a; }
.wpn-event-meta > * { margin: 0; }
.wpn-event-excerpt { font-size: 0.95rem; line-height: 1.5; color: var(--wpn-mute); }
.wpn-event-excerpt p { margin: 0; }

/* One call to action per row: Office Hours request a slot, everything else views the event. */
.wpn-event-cta { margin: 0; }
.wpn-event-rows > li:not(.wpn_event_category-office-hours) .wpn-event-cta { display: none; }
.wpn-event-rows > li.wpn_event_category-office-hours .wpn-cta--view { display: none; }
.wpn-cta .wp-block-button__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 8px; background: var(--wpn-blue); color: #fff; font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.wpn-cta--view { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid #8c8f94; border-radius: 8px; background: #fff; color: var(--wpn-ink); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.wpn-cta--view:hover { border-color: var(--wpn-ink); }
.wpn-empty { margin: 0; padding: 48px; text-align: center; background: #fff; border: 1px dashed #c3c4c7; border-radius: 14px; color: var(--wpn-mute); }
.wpn-event-list .wp-block-query-pagination { margin-top: 24px; }

/* Calendar view */
.wpn-month-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 24px; }
.wpn-month-label { margin: 0; min-width: 190px; text-align: center; font-size: 1.5rem; }
.wpn-month-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #c3c4c7; border-radius: 10px; background: #fff; color: var(--wpn-ink); }
.wpn-month-btn.is-disabled { opacity: 0.4; }
a.wpn-month-btn:hover { border-color: var(--wpn-ink); }
a.wpn-month-btn:focus-visible { outline: 3px solid #9ec2e6; outline-offset: 2px; }
.wpn-cal-query { overflow-x: auto; }
.wpn-cal-query .wp-block-gatherpress-calendar {
	--gatherpress-calendar-column-gap: 0px;
	--gatherpress-calendar-day-bg: #fff;
	--gatherpress-calendar-header-bg: #f6f7f7;
	--gatherpress-calendar-day-has-posts-border: transparent;
	min-width: 840px;
	margin: 0;
	border: 1px solid var(--wpn-line);
	border-radius: 14px;
	overflow: hidden;
}
.wpn-cal-query .gatherpress-calendar__day { min-height: 128px; height: auto; aspect-ratio: auto; padding: 10px; border-right: 1px solid #f0f0f1; border-bottom: 1px solid #e3e6ea; }
.wpn-cal-query .gatherpress-calendar__day.gatherpress--is-empty { opacity: 1; background: #fafafa; }
.wpn-cal-query .gatherpress-calendar__day-number { font-size: 0.875rem; font-weight: 700; }
.wpn-cal-query thead th { padding: 12px 14px; text-align: left; font-size: 0.8rem; font-weight: 700; color: #3c434a; }
.wpn-cal-query .gatherpress-calendar__entry { --wpn-bg: #e6f0f9; --wpn-fg: #135e96; margin-bottom: 6px; }
.wpn-cal-query .gatherpress-calendar__entry.wpn_event_category-meetup { --wpn-bg: #e6f4ea; --wpn-fg: #1e6b34; }
.wpn-cal-query .gatherpress-calendar__entry.wpn_event_category-workshop { --wpn-bg: #fcf0e1; --wpn-fg: #8a4b00; }
.wpn-cal-query .gatherpress-calendar__entry.wpn_event_category-community { --wpn-bg: #f4f1fa; --wpn-fg: #5b3e96; }
.wpn-cal-entry { padding: 5px 8px; border-radius: 6px; background: var(--wpn-bg); color: var(--wpn-fg); font-size: 0.75rem; line-height: 1.3; font-weight: 600; }
.wpn-cal-entry > * { margin: 0; }
.wpn-cal-entry .wp-block-gatherpress-event-date { font-weight: 500; }
.wpn-cal-entry .wp-block-post-title { font-size: 0.75rem; font-weight: 600; line-height: 1.3; }
.wpn-cal-entry a { color: inherit; text-decoration: none; }
.wpn-cal-entry a:hover { text-decoration: underline; }
.wpn-cal-note { margin: 16px 0 0; font-size: 0.875rem; color: var(--wpn-mute); }

@media (max-width: 600px) {
	.wpn-events-band { padding: 40px 16px 28px; }
	.wpn-view { padding: 28px 16px 64px; }
	.wpn-event-row { padding: 18px; gap: 16px; }
}
