/**
 * McAlester Chamber Events — front-end styles.
 * Scoped to .chamber-events-wrap. Uses NectarBlocks design tokens.
 */

/* ── Tokens ───────────────────────────────────────────────── */

.chamber-events-wrap {
	--ce-color-primary: #303390;
	--ce-color-blue: #216fb1;
	--ce-color-coral: #fd7c6e;
	--ce-color-peach: #f5b98c;
	--ce-color-white: #ffffff;
	--ce-color-ink: #000000;
	--ce-color-muted: #555555;
	--ce-color-border: #e5e7eb;
	--ce-color-surface: #f9fafb;

	--ce-font-body: 'Inter', sans-serif;
	--ce-font-heading: 'Satoshi', 'Inter', sans-serif;
	--ce-font-mono: 'DM Mono', monospace;

	--ce-text-base: 1rem;
	--ce-text-sm: 0.875rem;
	--ce-text-xs: 0.75rem;
	--ce-text-lg: 1.25rem;

	--ce-radius: 8px;
	--ce-radius-sm: 4px;
	--ce-gap: 1.25rem;

	--ce-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
	--ce-shadow-hover: 0 4px 20px rgba(48, 51, 144, 0.12);

	font-family: var(--ce-font-body);
	color: var(--ce-color-ink);
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
}

/* ── Month Headers ────────────────────────────────────────── */

.ce-month-header {
	font-family: var(--ce-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 2.5rem 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ce-color-primary);
	color: var(--ce-color-primary);
}

.ce-month-header:first-child {
	margin-top: 0;
}

/* ── Event Card ───────────────────────────────────────────── */

.ce-event-card {
	position: relative;
	background: var(--ce-color-white);
	border: 1px solid var(--ce-color-border);
	border-radius: var(--ce-radius);
	margin-bottom: var(--ce-gap);
	box-shadow: var(--ce-shadow);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	overflow: hidden;
}

.ce-event-card:hover {
	box-shadow: var(--ce-shadow-hover);
	border-color: var(--ce-color-primary);
}

.ce-event-card--cancelled {
	opacity: 0.7;
}

/* ── Card Layout ──────────────────────────────────────────── */

.ce-event-card__layout {
	display: flex;
	align-items: stretch;
}

/* ── Card Image (left column) ────────────────────────────── */

.ce-event-card__image {
	display: block;
	flex-shrink: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.ce-event-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Card Body (right column) ────────────────────────────── */

.ce-event-card__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 1.25rem;
}

/* ── Date Row ─────────────────────────────────────────────── */

.ce-event-card__date {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--ce-color-border);
}

.ce-event-card__day {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ce-color-muted);
}

.ce-event-card__date-num {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-text-sm);
	font-weight: 700;
	color: var(--ce-color-ink);
}

/* ── Content Column ───────────────────────────────────────── */

.ce-event-card__content {
	flex: 1;
	min-width: 0;
}

.ce-event-card__header {
	margin-bottom: 0.5rem;
}

.ce-event-card__title {
	font-family: var(--ce-font-heading);
	font-size: var(--ce-text-lg);
	font-weight: 700;
	margin: 0.25rem 0 0;
	line-height: 1.3;
}

.ce-event-card__title a {
	color: var(--ce-color-ink);
	text-decoration: none;
}

.ce-event-card__title a:hover {
	color: var(--ce-color-primary);
}

.ce-event-card__subtitle {
	display: block;
	font-size: var(--ce-text-sm);
	font-weight: 400;
	color: var(--ce-color-muted);
	margin-top: 2px;
}

/* ── Meta Line ────────────────────────────────────────────── */

.ce-event-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: var(--ce-text-sm);
	color: var(--ce-color-muted);
	margin-top: 0.5rem;
}

.ce-event-card__meta .ce-icon {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	color: var(--ce-color-primary);
	opacity: 0.7;
}

.ce-event-card__time,
.ce-event-card__location,
.ce-event-card__cost {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ce-event-card__sponsor {
	font-style: italic;
	font-size: var(--ce-text-xs);
	color: var(--ce-color-muted);
}

/* ── Badges ───────────────────────────────────────────────── */

.ce-badge {
	display: inline-block;
	font-family: var(--ce-font-mono);
	font-size: var(--ce-text-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 2px 8px;
	border-radius: var(--ce-radius-sm);
}

.ce-badge--type {
	background: var(--ce-badge-color, var(--ce-color-primary));
	color: var(--ce-color-white);
}

.ce-badge--cancelled {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #b91c1c;
	color: var(--ce-color-white);
	z-index: 3;
}

/* ── Register Button ──────────────────────────────────────── */

.ce-btn {
	display: inline-block;
	font-family: var(--ce-font-heading);
	font-size: var(--ce-text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 8px 20px;
	border-radius: 100px;
	border: 2px solid var(--ce-color-primary);
	background: transparent;
	color: var(--ce-color-primary);
	cursor: pointer;
	text-decoration: none;
	margin-top: 0.75rem;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ce-btn:hover {
	background: var(--ce-color-primary);
	color: var(--ce-color-white);
	box-shadow: 0 2px 12px rgba(48, 51, 144, 0.25);
}

/* ── GF Embed ─────────────────────────────────────────────── */

.ce-gf-embed {
	margin-top: 1rem;
	padding: 1rem;
	background: var(--ce-color-surface);
	border-radius: var(--ce-radius);
	border: 1px solid var(--ce-color-border);
}

/* ── Featured Section ─────────────────────────────────────── */

.ce-featured-section {
	padding: 2rem;
	background: var(--ce-color-surface);
	border-radius: var(--ce-radius);
	border: 2px solid var(--ce-color-primary);
}

.ce-featured-heading {
	font-family: var(--ce-font-heading);
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--ce-color-primary);
	margin: 0 0 1.5rem;
}

.ce-featured-section .ce-event-card {
	border-left: 4px solid var(--ce-color-primary);
}

/* ── No Events ────────────────────────────────────────────── */

.ce-no-events {
	font-size: var(--ce-text-base);
	color: var(--ce-color-muted);
	text-align: center;
	padding: 3rem 1rem;
}

/* ── Single Event Page ────────────────────────────────────── */

.ce-single {
	max-width: 860px;
	margin: 0 auto;
	padding: 2rem 0 3rem;
	font-family: var(--ce-font-body);
}

.ce-single__hero {
	display: flex;
	gap: 2.5rem;
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--ce-color-border);
}

.ce-single__image {
	flex: 0 0 380px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--ce-shadow);
}

.ce-single__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ce-single__details {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ce-single__title {
	font-family: var(--ce-font-heading);
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1.15;
	margin: 0.5rem 0 0.25rem;
	color: var(--ce-color-ink);
}

.ce-single__subtitle {
	font-size: var(--ce-text-lg);
	color: var(--ce-color-muted);
	margin: 0 0 1.25rem;
}

.ce-single__meta-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ce-single__meta-list li {
	font-size: var(--ce-text-sm);
	color: var(--ce-color-ink);
	display: flex;
	align-items: flex-start;
	gap: 8px;
	line-height: 1.5;
}

.ce-single__meta-list li small {
	color: var(--ce-color-muted);
}

.ce-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	color: var(--ce-color-primary);
}

.ce-single__cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
}

.ce-single__cal-group {
	display: flex;
	gap: 0.5rem;
	flex-basis: 100%;
}

.ce-single__content {
	margin-bottom: 2rem;
	font-size: var(--ce-text-base);
	line-height: 1.75;
}

.ce-single__content p:last-child {
	margin-bottom: 0;
}

.ce-single__cancelled-banner {
	background: #b91c1c;
	color: var(--ce-color-white);
	font-family: var(--ce-font-heading);
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	padding: 14px;
	border-radius: var(--ce-radius);
	margin-bottom: 1.5rem;
}

.ce-single__sponsor-legacy {
	margin-top: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--ce-color-surface);
	border-radius: var(--ce-radius);
	font-size: var(--ce-text-sm);
	border: 1px solid var(--ce-color-border);
}

.ce-single__sponsor-legacy a {
	color: var(--ce-color-primary);
	font-weight: 600;
}

.ce-single__registration {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: var(--ce-color-surface);
	border-radius: var(--ce-radius);
	border: 1px solid var(--ce-color-border);
}

/* ── Sponsors ─────────────────────────────────────────────── */

.ce-sponsors {
	margin: 2rem 0;
	padding: 2rem;
	background: var(--ce-color-surface);
	border-radius: 12px;
	border: 1px solid var(--ce-color-border);
}

.ce-sponsors__heading {
	font-family: var(--ce-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--ce-color-primary);
	margin: 0 0 1.5rem;
	text-align: center;
}

.ce-sponsors__tier {
	margin-bottom: 1.5rem;
}

.ce-sponsors__tier:last-child {
	margin-bottom: 0;
}

.ce-sponsors__tier-heading {
	font-family: var(--ce-font-mono);
	font-size: var(--ce-text-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ce-color-muted);
	margin: 0 0 0.75rem;
	text-align: center;
}

.ce-sponsors__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	align-items: center;
}

.ce-sponsor {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: opacity 0.2s;
}

.ce-sponsor:hover {
	opacity: 0.8;
}

.ce-sponsor img {
	display: block;
	height: auto;
	object-fit: contain;
}

.ce-sponsor__name-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-family: var(--ce-font-heading);
	font-weight: 700;
	color: var(--ce-color-primary);
	background: var(--ce-color-white);
	border: 2px dashed var(--ce-color-border);
	border-radius: var(--ce-radius);
	padding: 0.5rem;
	line-height: 1.2;
}

/* Card-level sponsors (compact) */
.ce-event-card__sponsors {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 4px;
}

.ce-event-card__sponsors .ce-sponsor img {
	max-width: 60px;
	max-height: 30px;
}

.ce-event-card__sponsors .ce-sponsor__name-fallback {
	width: auto !important;
	height: auto !important;
	font-size: 10px !important;
	padding: 2px 6px;
	border-width: 1px;
}

/* ── Card Actions Row ─────────────────────────────────────── */

.ce-event-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 0.75rem;
}

.ce-event-card__cal-row {
	display: flex;
	gap: 0.375rem;
	align-items: center;
	margin-top: 0.5rem;
}

.ce-btn--cal {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 0.6875rem;
	font-weight: 500;
	padding: 2px 8px;
	border-width: 1px;
	border-color: transparent;
	border-radius: 4px;
	color: var(--ce-color-muted);
	background: transparent;
	opacity: 0.5;
	margin-top: 0;
	text-transform: none;
	letter-spacing: 0;
}

.ce-btn--cal .ce-icon {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.ce-btn--cal:hover {
	opacity: 1;
	color: var(--ce-color-primary);
	background: var(--ce-color-surface);
	border-color: var(--ce-color-border);
	box-shadow: none;
}

/* Single event: stack cal buttons vertically */
.ce-single__cta-row .ce-btn--cal {
	opacity: 1;
	font-size: var(--ce-text-sm);
	padding: 8px 20px;
	border-color: var(--ce-color-border);
	border-radius: 100px;
	border-width: 2px;
}

.ce-single__cta-row .ce-btn--cal .ce-icon {
	width: 14px;
	height: 14px;
}

.ce-single__cta-row .ce-btn--cal:hover {
	border-color: var(--ce-color-primary);
	background: transparent;
}

/* ── Share Buttons (single event) ─────────────────────────── */

.ce-single__share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--ce-color-border);
}

.ce-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--ce-font-heading);
	font-size: var(--ce-text-sm);
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 100px;
	border: 1px solid var(--ce-color-border);
	background: var(--ce-color-white);
	color: var(--ce-color-muted);
	cursor: pointer;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.ce-share-btn:hover {
	border-color: var(--ce-color-primary);
	color: var(--ce-color-primary);
}

.ce-share-btn--copy.copied {
	border-color: #15803d;
	color: #15803d;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
	.ce-event-card__layout {
		flex-direction: column;
	}

	.ce-event-card__image {
		width: 100%;
		aspect-ratio: 4 / 3;
	}

	.ce-single {
		padding: 1rem 0 2rem;
	}

	.ce-single__hero {
		flex-direction: column;
		gap: 1.5rem;
	}

	.ce-single__image {
		flex: none;
		max-width: 100%;
	}

	.ce-single__title {
		font-size: 1.75rem;
	}

	.ce-sponsors {
		padding: 1.25rem;
	}

	.ce-sponsors__grid {
		gap: 1rem;
	}
}

@media (max-width: 600px) {
	.chamber-events-wrap {
		padding: 0 1rem;
	}

	.ce-featured-section {
		padding: 1rem;
	}

	.ce-event-card__meta {
		flex-direction: column;
		gap: 0.25rem;
	}
}
