/* Assembly Election Widget — multi-state column grid */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,900&display=swap');

.assembly-election-widget.aew-wrap {
	font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	max-width: 100%;
	margin: auto;
	width: 100%;
}

/* Title (matches candidate widget bar when that CSS is absent) */
.assembly-election-widget .aew-title-row.candidate-widget-title {
	position: relative;
	margin-bottom: 1.25rem;
	padding-left: 15px;
}

.assembly-election-widget .aew-title-row .title-red-bar {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 5px;
	height: 30px;
	background: #d32f2f;
}

.assembly-election-widget .aew-heading.title-text {
	font-weight: 900;
	font-size: 1.375rem;
	color: #000;
	margin: 0;
	line-height: 1.2;
}

.aew-board {
	background: #fff;
	border: 0px;
	border-radius: 0px;
	padding: 0px 0px 0px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aew-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0px;
	width: 100%;
}

.aew-col {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.aew-header {
	background: #ececec;
	padding: 10px 8px 12px;
	text-align: center;
	border-radius: 0px 0px 0 0;
	flex-shrink: 0;
}

.aew-state-name {
	font-weight: 900;
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	color: #111;
	line-height: 1.25;
	word-break: break-word;
}

.aew-meta {
	font-weight: 700;
	font-size: 0.65rem;
	color: #222;
	margin-top: 6px;
	line-height: 1.3;
}

.aew-cells {
	display: flex;
	flex-direction: column;
	gap: 0px;
	flex: 1;
	padding-top: 0px;
}

.aew-cell {
	border-radius: 0px;
	min-height: 72px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 4px;
	text-align: center;
	box-sizing: border-box;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assembly-election-widget.aew-wrap.updating .aew-cell {
	animation: aew-pulse 0.45s ease;
}

@keyframes aew-pulse {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.88;
	}
	100% {
		opacity: 1;
	}
}

.aew-party {
	font-weight: 700;
	font-size: 0.7rem;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	margin-bottom: 4px;
	line-height: 1.2;
	word-break: break-word;
}

.aew-seat-num {
	font-weight: 900;
	font-size: 1.75rem;
	color: #fff;
	line-height: 1;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.assembly-election-widget.aew-wrap.loading {
	opacity: 0.92;
	pointer-events: none;
}

/* Tablet: horizontal scroll for full fidelity */
@media (max-width: 1024px) {
	.aew-board {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.aew-grid {
		grid-template-columns: repeat(5, minmax(120px, 1fr));
		min-width: 620px;
	}

	.aew-state-name {
		font-size: 0.65rem;
	}

	.aew-seat-num {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.aew-grid {
		min-width: 560px;
		gap: 0px;
	}

	.aew-cell {
		min-height: 64px;
	}
}
