/**
 * Calendar WP - Overview component styles.
 *
 * Material Design 3 inspired event list.  Category colours are injected
 * via CSS custom properties (--cat-bg, --cat-text, --cat-accent) on each
 * card element.
 */

/* ------------------------------------------------------------------ */
/*  Material Symbols baseline                                         */
/* ------------------------------------------------------------------ */
.cwp-section .material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ------------------------------------------------------------------ */
/*  Section wrapper                                                   */
/* ------------------------------------------------------------------ */
.cwp-section {
	padding: 5rem 3rem;
	max-width: 80rem;
	margin: 0 auto;
	font-family: 'Be Vietnam Pro', sans-serif;
	color: #1e1b15;
}

/* ------------------------------------------------------------------ */
/*  Header                                                            */
/* ------------------------------------------------------------------ */
.cwp-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 3rem;
}

.cwp-header-left {
	flex: 1 1 auto;
}

.cwp-header-title {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 2.25rem;
	font-weight: 800;
	color: #5b4b00;
	margin: 0 0 1rem;
	line-height: 1.2;
}

.cwp-header-subtitle {
	color: #4c4637;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/*  Legend                                                             */
/* ------------------------------------------------------------------ */
.cwp-legend {
	display: none;
	gap: 1rem;
}

.cwp-legend-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cwp-legend-dot {
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 9999px;
	flex-shrink: 0;
}

.cwp-legend-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: -0.05em;
}

/* ------------------------------------------------------------------ */
/*  Event list                                                        */
/* ------------------------------------------------------------------ */
.cwp-event-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	transition: opacity 0.2s;
}

.cwp-event-list.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ------------------------------------------------------------------ */
/*  Event card                                                        */
/* ------------------------------------------------------------------ */
.cwp-event-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #faf3e7;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	transition: background-color 0.3s;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.cwp-event-card:hover {
	background-color: #eee7dc;
}

/* ------------------------------------------------------------------ */
/*  Date badge                                                        */
/* ------------------------------------------------------------------ */
.cwp-event-date {
	width: 100%;
	background-color: var(--cat-bg, #6b7280);
	color: var(--cat-text, #ffffff);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem 0;
	flex-shrink: 0;
}

.cwp-date-day {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 1.875rem;
	font-weight: 800;
	line-height: 1;
}

.cwp-date-month {
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	opacity: 0.8;
}

/* ------------------------------------------------------------------ */
/*  Event content                                                     */
/* ------------------------------------------------------------------ */
.cwp-event-content {
	padding: 2rem;
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 1.5rem;
	min-width: 0;
}

.cwp-event-title {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 1.5rem;
	font-weight: 800;
	color: #1e1b15;
	margin: 0;
	text-transform: uppercase;
	line-height: 1.3;
	min-width: 0;
	transition: color 0.3s;
}

.cwp-event-card:hover .cwp-event-title {
	color: var(--cat-accent, #1e1b15);
}

/* ------------------------------------------------------------------ */
/*  Event details (time + location)                                   */
/* ------------------------------------------------------------------ */
.cwp-event-details {
	display: none;
	gap: 1.5rem;
	align-items: center;
	color: #4c4637;
	flex-shrink: 0;
	white-space: nowrap;
}

.cwp-detail-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	font-weight: 500;
}

.cwp-detail-icon {
	color: var(--cat-accent, #4c4637);
	font-size: 1.25rem;
}

/* ------------------------------------------------------------------ */
/*  Pager (arrow pagination)                                          */
/* ------------------------------------------------------------------ */
.cwp-pager {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	margin-top: 3rem;
}

.cwp-pager-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	border: none;
	background-color: #faf3e7;
	color: #5b4b00;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.15s;
}

.cwp-pager-btn:hover:not(:disabled) {
	background-color: #5b4b00;
	color: #faf3e7;
	box-shadow: 0 4px 12px rgba(91, 75, 0, 0.18);
}

.cwp-pager-btn:active:not(:disabled) {
	transform: scale(0.94);
}

.cwp-pager-btn:focus-visible {
	outline: 2px solid #5b4b00;
	outline-offset: 3px;
}

.cwp-pager-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	box-shadow: none;
}

.cwp-pager-btn .material-symbols-outlined {
	font-size: 1.5rem;
	font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* ------------------------------------------------------------------ */
/*  Empty state                                                       */
/* ------------------------------------------------------------------ */
.cwp-overview-empty {
	text-align: center;
	color: #4c4637;
	padding: 3rem 1rem;
	font-family: 'Be Vietnam Pro', sans-serif;
}

/* ------------------------------------------------------------------ */
/*  Responsive: sm (640px+)                                           */
/* ------------------------------------------------------------------ */
@media (min-width: 640px) {
	.cwp-event-details {
		display: flex;
	}
}

/* ------------------------------------------------------------------ */
/*  Responsive: md (768px+)                                           */
/* ------------------------------------------------------------------ */
@media (min-width: 768px) {
	.cwp-section {
		padding: 5rem 3rem;
	}

	.cwp-legend {
		display: flex;
	}

	.cwp-event-card {
		flex-direction: row;
	}

	.cwp-event-date {
		width: 8rem;
		min-width: 8rem;
		padding: 2rem 0;
		align-self: stretch;
	}
}

/* ------------------------------------------------------------------ */
/*  Responsive: small screens                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 639px) {
	.cwp-section {
		padding: 2.5rem 1.5rem;
	}

	.cwp-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.cwp-header-title {
		font-size: 1.75rem;
	}

	.cwp-event-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		padding: 1.25rem;
	}

	.cwp-event-title {
		font-size: 1.1rem;
	}
}
