/*
 * Event Details Shortcode — styles
 * Enqueued by includes/shortcodes/event-details.php
 */

.cjdng-ed {
	--cjdng-ed-accent: #c2410c;          /* community / event orange */
	--cjdng-ed-accent-soft: #fff4ec;
	--cjdng-ed-border: #e5e7eb;
	--cjdng-ed-text: #1f2937;
	--cjdng-ed-muted: #6b7280;
	font-family: inherit;
	color: var(--cjdng-ed-text);
	line-height: 1.55;
	margin: 1.5rem 0;
}

/* Hide Astra's default entry-header on single-event pages — the hero section
   in our shortcode owns the title + featured image presentation. */
.single-event .entry-header,
.single-event .ast-single-post-banner-wrap,
.single-event .ast-banner-single-post-wrap,
.single-event .ast-single-entry-banner {
	display: none !important;
}

/* Pull the structured content up to flush against the page top so the hero
   feels like a proper banner. */
.single-event .entry-content > .cjdng-ed {
	margin-top: 0;
}

/* Hero: featured image + H1 title */
.cjdng-ed-hero {
	margin: 0 0 1.25rem;
	border-radius: 12px;
	overflow: hidden;
	background: var(--cjdng-ed-accent-soft);
}
.cjdng-ed-hero-image {
	margin: 0;
	line-height: 0;
}
.cjdng-ed-hero-img {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	display: block;
}
.cjdng-ed-hero-title {
	margin: 0;
	padding: 1.25rem 1.5rem;
	font-size: clamp( 1.8rem, 3.5vw, 2.6rem );
	line-height: 1.15;
	color: var(--cjdng-ed-accent);
}
.cjdng-ed-hero-has-image .cjdng-ed-hero-title {
	background: rgba(255, 255, 255, 0.92);
	border-top: 4px solid var(--cjdng-ed-accent);
}

.cjdng-ed-section {
	background: #fff;
	border: 1px solid var(--cjdng-ed-border);
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
}
.cjdng-ed-section:last-child { margin-bottom: 0; }

.cjdng-ed-title {
	margin: 0 0 0.85rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--cjdng-ed-text);
	border-bottom: 2px solid var(--cjdng-ed-accent);
	padding-bottom: 0.4rem;
	display: inline-block;
	line-height: 1.3;
}

/* Status banner */
.cjdng-ed-status-banner {
	padding: 0.85rem 1.25rem;
	border-left: 4px solid var(--cjdng-ed-accent);
	background: var(--cjdng-ed-accent-soft);
	font-size: 1rem;
}
.cjdng-ed-status-cancelled { border-left-color: #b91c1c; background: #fef2f2; color: #991b1b; }
.cjdng-ed-status-postponed { border-left-color: #b45309; background: #fffbeb; color: #92400e; }
.cjdng-ed-status-sold_out,
.cjdng-ed-status-registration_full { border-left-color: #6b7280; background: #f9fafb; color: #374151; }

/* Pills */
.cjdng-ed-pills {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.cjdng-ed-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 500;
	background: #f3f4f6;
	color: var(--cjdng-ed-text);
	border: 1px solid var(--cjdng-ed-border);
}
.cjdng-ed-pill-category { background: var(--cjdng-ed-accent-soft); color: var(--cjdng-ed-accent); border-color: #fed7aa; }
.cjdng-ed-pill-audience { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.cjdng-ed-pill-format   { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.cjdng-ed-pill-language { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }

.cjdng-ed-organizer { margin: 0.75rem 0 0; color: var(--cjdng-ed-muted); }

/* Dates */
.cjdng-ed-dates {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cjdng-ed-date-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0.55rem 0;
	border-bottom: 1px dashed var(--cjdng-ed-border);
	align-items: baseline;
}
.cjdng-ed-date-row:last-child { border-bottom: none; }
.cjdng-ed-date {
	font-weight: 600;
	min-width: 12rem;
}
.cjdng-ed-time {
	color: var(--cjdng-ed-muted);
	font-variant-numeric: tabular-nums;
}
.cjdng-ed-date-notes {
	font-style: italic;
	color: var(--cjdng-ed-muted);
	font-size: 0.92rem;
}
.cjdng-ed-deadline {
	margin: 0.75rem 0 0;
	font-size: 0.92rem;
	color: var(--cjdng-ed-muted);
}

/* Where */
.cjdng-ed-venue { margin: 0 0 0.25rem; font-size: 1.05rem; }
.cjdng-ed-centre-link { text-decoration: none; color: var(--cjdng-ed-accent); }
.cjdng-ed-centre-link:hover { text-decoration: underline; }
.cjdng-ed-address { margin: 0; color: var(--cjdng-ed-muted); }
.cjdng-ed-online-link {
	margin: 0.75rem 0 0;
	padding: 0.5rem 0.75rem;
	background: var(--cjdng-ed-accent-soft);
	border-radius: 6px;
}
.cjdng-ed-online-link a { color: var(--cjdng-ed-accent); font-weight: 500; text-decoration: none; }
.cjdng-ed-online-link a:hover { text-decoration: underline; }

/* Description */
.cjdng-ed-body p { margin: 0 0 0.85em; }
.cjdng-ed-body p:last-child { margin-bottom: 0; }

/* Aux + specs lists */
.cjdng-ed-aux {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}
.cjdng-ed-aux li { padding-left: 0; }

.cjdng-ed-specs {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4rem 1rem;
	margin: 0;
}
.cjdng-ed-specs dt {
	font-weight: 600;
	color: var(--cjdng-ed-muted);
}
.cjdng-ed-specs dd { margin: 0; }
.cjdng-ed-bring-list { margin: 0; padding-left: 1.1rem; }

.cjdng-ed-notes {
	margin: 0.75rem 0 0;
	padding: 0.65rem 0.85rem;
	background: #fafafa;
	border-radius: 6px;
	font-size: 0.93rem;
	color: var(--cjdng-ed-muted);
}

/* Pricing tiers */
.cjdng-ed-free-banner {
	margin: 0 0 0.5rem;
	padding: 0.65rem 0.85rem;
	background: var(--cjdng-ed-accent-soft);
	border-radius: 8px;
	color: var(--cjdng-ed-accent);
	font-size: 1.05rem;
}
.cjdng-ed-tiers {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}
.cjdng-ed-tier {
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--cjdng-ed-border);
	border-radius: 8px;
	background: #fff;
}
.cjdng-ed-tier-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
}
.cjdng-ed-tier-label {
	font-weight: 600;
	color: var(--cjdng-ed-text);
}
.cjdng-ed-tier-price {
	font-weight: 700;
	color: var(--cjdng-ed-accent);
	font-size: 1.1rem;
	font-variant-numeric: tabular-nums;
}
.cjdng-ed-tier-unit {
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--cjdng-ed-muted);
}
.cjdng-ed-tier-notes {
	margin: 0.25rem 0 0;
	font-size: 0.9rem;
	color: var(--cjdng-ed-muted);
	font-style: italic;
}

/* Actions */
.cjdng-ed-actions {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
.cjdng-ed-btn {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.15s;
	font-size: 0.95rem;
}
.cjdng-ed-btn-primary {
	background: var(--cjdng-ed-accent);
	color: #fff;
}
.cjdng-ed-btn-primary:hover { opacity: 0.9; color: #fff; }
.cjdng-ed-btn-secondary {
	background: #1877f2;
	color: #fff;
}
.cjdng-ed-btn-secondary:hover { opacity: 0.9; color: #fff; }

/* Contact */
.cjdng-ed-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
}
.cjdng-ed-contact-list a { color: var(--cjdng-ed-accent); text-decoration: none; }
.cjdng-ed-contact-list a:hover { text-decoration: underline; }

@media ( max-width: 600px ) {
	.cjdng-ed-section { padding: 1rem 1.1rem; }
	.cjdng-ed-date { min-width: 100%; }
	.cjdng-ed-specs { grid-template-columns: 1fr; gap: 0.15rem 0; }
	.cjdng-ed-specs dd { margin-bottom: 0.5rem; }
}
