/* NW Event Manager */

.nw-em-archive-header .nw-em-page-title {
	margin: 0 0 0.75rem;
}

.nw-em-view-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.nw-em-view-nav .nw-em-nav-link {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	text-decoration: none;
	border: 1px solid currentColor;
	border-radius: 2px;
}

.nw-em-view-nav .nw-em-nav-link.active {
	font-weight: 600;
	text-decoration: underline;
}

.nw-em-filters .form-control,
.nw-em-filters select {
	width: 100%;
}

.nw-em-event-card {
	padding: 1rem 0;
	border-bottom: 1px solid #ddd;
}

.nw-em-event-card:last-child {
	border-bottom: 0;
}

.nw-em-card-title {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
}

.nw-em-card-date {
	margin: 0 0 0.5rem;
	color: #555;
	font-size: 0.95rem;
}

.nw-em-read-more {
	font-weight: 600;
}

.nw-em-category-badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 2px;
	font-size: 0.875rem;
	margin: 0 0.35rem 0.35rem 0;
	background: var(--nw-em-cat-bg, #1a4d8c);
	color: var(--nw-em-cat-text, #fff);
	text-decoration: none;
}

.nw-em-category-badge:hover,
.nw-em-category-badge:focus {
	opacity: 0.9;
	text-decoration: underline;
}

.nw-em-calendar-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.nw-em-calendar-table th,
.nw-em-calendar-table td {
	vertical-align: top;
	padding: 0.5rem;
	border: 1px solid #ddd;
}

.nw-em-cal-day-num {
	font-weight: 600;
	display: block;
	margin-bottom: 0.25rem;
}

.nw-em-cal-today {
	background: #f5f5f5;
}

.nw-em-cal-event-link {
	display: block;
	font-size: 0.85rem;
	line-height: 1.35;
	margin-bottom: 0.2rem;
	word-break: break-word;
}

.nw-em-cal-empty {
	background: #fafafa;
}

.nw-em-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nw-em-dl dt {
	font-weight: 600;
	margin-top: 0.75rem;
}

.nw-em-dl dd {
	margin: 0.15rem 0 0;
}

.nw-em-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nw-em-skip-link:focus {
	position: static;
	width: auto;
	height: auto;
	padding: 0.5rem 1rem;
	background: #111;
	color: #fff;
	display: inline-block;
}

.nw-em-event-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.nw-em-osm-map iframe {
	width: 100%;
	border: 1px solid #ddd;
}

.nw-em-pagination .page-numbers {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	margin-right: 0.25rem;
}

@media (max-width: 767px) {
	.nw-em-calendar-table {
		font-size: 0.8rem;
	}
}

/* Single event */

.nw-em-single {
	padding: 1.5rem 0 3rem;
}

.nw-em-single-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1rem;
}

.nw-em-back-link {
	margin: 0 0 1.25rem;
}

.nw-em-back-link a {
	text-decoration: none;
}

.nw-em-back-link a:hover,
.nw-em-back-link a:focus {
	text-decoration: underline;
}

.nw-em-event-header {
	margin-bottom: 1.5rem;
}

.nw-em-event-title {
	margin: 0.5rem 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	line-height: 1.2;
}

.nw-em-event-datetime {
	margin: 0.5rem 0 0;
}

.nw-em-event-datetime strong {
	display: block;
	margin-bottom: 0.15rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.nw-em-event-recurrence {
	margin: 0.35rem 0 0;
	color: #555;
	font-size: 0.95rem;
}

.nw-em-event-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 2rem;
	align-items: start;
}

.nw-em-event-main {
	min-width: 0;
}

.nw-em-featured-image {
	margin: 0 0 1.5rem;
}

.nw-em-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.nw-em-event-content {
	line-height: 1.65;
}

.nw-em-event-content > :first-child {
	margin-top: 0;
}

.nw-em-event-content p,
.nw-em-event-content ul,
.nw-em-event-content ol {
	margin-bottom: 1rem;
}

.nw-em-event-content h2,
.nw-em-event-content h3,
.nw-em-event-content h4 {
	margin: 1.5rem 0 0.75rem;
	line-height: 1.3;
}

.nw-em-section {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e0e0e0;
}

.nw-em-section-title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
}

.nw-em-venue-details {
	font-style: normal;
	line-height: 1.6;
}

.nw-em-venue-details a {
	word-break: break-word;
}

.nw-em-organiser-details strong {
	display: block;
	margin-bottom: 0.35rem;
}

.nw-em-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nw-em-contact-list li {
	margin: 0.35rem 0;
}

.nw-em-attachment-list {
	margin: 0;
	padding-left: 1.25rem;
}

.nw-em-attachment-list li {
	margin: 0.35rem 0;
}

.nw-em-event-sidebar {
	position: sticky;
	top: 1.5rem;
}

.nw-em-sidebar-card {
	background: #f7f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 1rem 1.15rem;
	margin-bottom: 1rem;
}

.nw-em-sidebar-title {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.nw-em-sidebar-datetime,
.nw-em-sidebar-venue,
.nw-em-sidebar-recurrence {
	margin: 0;
	line-height: 1.55;
}

.nw-em-sidebar-recurrence {
	margin-top: 0.35rem;
	color: #555;
	font-size: 0.9rem;
}

.nw-em-sidebar-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.nw-em-btn {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 1px solid transparent;
	border-radius: 3px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.nw-em-btn:hover,
.nw-em-btn:focus {
	opacity: 0.9;
	text-decoration: none;
}

.nw-em-btn-primary {
	background: #1a4d8c;
	border-color: #1a4d8c;
	color: #fff;
}

.nw-em-btn-primary:hover,
.nw-em-btn-primary:focus,
.nw-em-btn-primary:focus-visible {
	background: #153d70;
	border-color: #153d70;
	color: #fff;
	opacity: 1;
}

.nw-em-btn-secondary {
	background: #fff;
	border-color: #1a4d8c;
	color: #1a4d8c;
}

.nw-em-event-footer-mobile {
	display: none;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e0e0e0;
	flex-wrap: wrap;
	gap: 0.75rem;
}

@media (max-width: 900px) {
	.nw-em-event-grid {
		grid-template-columns: 1fr;
	}

	.nw-em-event-sidebar {
		display: none;
	}

	.nw-em-event-footer-mobile {
		display: flex;
	}
}

@media (max-width: 767px) {
	.nw-em-btn {
		width: 100%;
	}
}
