/* ============================================================
   Conference Listing – style.css
   Colors: #000000 (black) | #ffffff (white) | #da2128 (red accent)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
	--cl-black:       #000000;
	--cl-white:       #ffffff;
	--cl-red:         #da2128;
	--cl-red-dark:    #b81a20;
	--cl-grey-light:  #f5f5f5;
	--cl-grey-mid:    #e0e0e0;
	--cl-grey-text:   #555555;
	--cl-thumb-w:     160px;
	--cl-radius:      2px;
	--cl-transition:  0.18s ease;
	--cl-font:        inherit;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.cl-wrap {
	font-family: var(--cl-font);
	color: var(--cl-black);
	width: 100%;
}

/* ── Filter bar ─────────────────────────────────────────────── */
.cl-filters {
	border-bottom: 1px solid var(--cl-black);
	padding-bottom: 20px;
	margin-bottom: 24px;
}

/* Search row */
.cl-search-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.cl-search-box {
	position: relative;
	flex: 1;
}

.cl-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cl-grey-text);
	font-size: 13px;
	pointer-events: none;
}

.cl-search {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px 9px 36px;
	border: 1px solid var(--cl-grey-mid);
	border-radius: var(--cl-radius);
	font-size: 14px;
	color: var(--cl-black);
	background: var(--cl-white);
	outline: none;
	transition: border-color var(--cl-transition);
}

.cl-search:focus {
	border-color: var(--cl-black);
}

/* Reset button */
.cl-reset-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border: 1px solid var(--cl-grey-mid);
	border-radius: var(--cl-radius);
	background: var(--cl-white);
	color: var(--cl-grey-text);
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color var(--cl-transition), color var(--cl-transition);
}

.cl-reset-btn:hover {
	border-color: var(--cl-red);
	color: var(--cl-red);
}

/* Taxonomy filter groups */
.cl-tax-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.cl-tax-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cl-tax-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cl-grey-text);
}

.cl-tax-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* Hidden checkbox + styled chip */
.cl-tax-option {
	cursor: pointer;
}

.cl-tax-check {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.cl-tax-chip {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--cl-grey-mid);
	border-radius: 20px;
	font-size: 12px;
	color: var(--cl-grey-text);
	background: var(--cl-white);
	transition:
		border-color var(--cl-transition),
		color var(--cl-transition),
		background var(--cl-transition);
	user-select: none;
}

.cl-tax-check:checked + .cl-tax-chip {
	border-color: var(--cl-red);
	color: var(--cl-red);
	background: #fff5f5;
}

.cl-tax-chip:hover {
	border-color: var(--cl-black);
	color: var(--cl-black);
}

/* ── Results count ──────────────────────────────────────────── */
.cl-results-count {
	font-size: 12px;
	color: var(--cl-grey-text);
	margin: 0 0 16px;
	letter-spacing: 0.02em;
}

/* ── Post list ──────────────────────────────────────────────── */
.cl-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* ── Single item card ───────────────────────────────────────── */
.cl-item {
	display: flex;
	flex-wrap: wrap;          /* allows detail panel to break to its own row */
	align-items: flex-start;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid var(--cl-grey-mid);
	transition: background var(--cl-transition);
}

.cl-item:first-child {
	border-top: 1px solid var(--cl-grey-mid);
}

/* Thumbnail */
.cl-item__thumb {
	flex: 0 0 var(--cl-thumb-w);
	width: var(--cl-thumb-w);
}

/* Empty thumb: invisible – takes no visual space */
.cl-item__thumb--empty {
	display: none;
}

.cl-item__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Body */
.cl-item__body {
	flex: 1;
	min-width: 0;
}

/* Title */
.cl-item__title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.cl-item__title a {
	color: var(--cl-black);
	text-decoration: none;
	transition: color var(--cl-transition);
}

.cl-item__title a:hover {
	color: var(--cl-red);
}

/* Meta (time + speaker) */
.cl-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
	margin-bottom: 10px;
	padding: 7px 12px;
	border-left: 2px solid var(--cl-red);
	background: var(--cl-grey-light);
}

.cl-item__meta-time,
.cl-item__meta-speaker {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--cl-black);
}

.cl-item__meta-time .fa-clock,
.cl-item__meta-speaker .fa-user {
	color: var(--cl-red);
	font-size: 12px;
}

/* Taxonomy terms */
.cl-item__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 10px;
}

.cl-item__term {
	display: inline-block;
	padding: 2px 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 1px solid var(--cl-grey-mid);
	border-radius: var(--cl-radius);
	color: var(--cl-grey-text);
}

/* Distinct accent per taxonomy */
.cl-item__term.tax-format {
	border-color: var(--cl-red);
	color: var(--cl-red);
}

.cl-item__term.tax-stage {
	border-color: #888;
	color: #444;
}

.cl-item__term.tax-audience {
	border-color: var(--cl-black);
	color: var(--cl-black);
}

/* Excerpt */
.cl-item__excerpt {
	font-size: 13px;
	color: var(--cl-grey-text);
	line-height: 1.6;
	margin: 0;
}

.cl-item__excerpt p {
	margin: 0;
}

/* ── No results ─────────────────────────────────────────────── */
.cl-no-results {
	padding: 32px 0;
	text-align: center;
	color: var(--cl-grey-text);
	font-size: 14px;
}

/* ── Load more ──────────────────────────────────────────────── */
.cl-loadmore-wrap {
	display: flex;
	justify-content: center;
	padding: 32px 0;
}

.cl-loadmore-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 28px;
	border: 1px solid var(--cl-black);
	border-radius: var(--cl-radius);
	background: var(--cl-white);
	color: var(--cl-black);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition:
		background var(--cl-transition),
		color var(--cl-transition),
		border-color var(--cl-transition);
}

.cl-loadmore-btn:hover:not(:disabled) {
	background: var(--cl-black);
	color: var(--cl-white);
}

.cl-loadmore-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Spinner inside button */
.cl-btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: cl-spin 0.6s linear infinite;
}

.cl-loadmore-btn.is-loading .cl-btn-spinner {
	display: inline-block;
}

.cl-loadmore-btn.is-loading .cl-btn-label {
	opacity: 0.6;
}

@keyframes cl-spin {
	to { transform: rotate(360deg); }
}

/* ── Skeleton loading (new items fade in) ───────────────────── */
.cl-item {
	animation: cl-fadein 0.25s ease both;
}

@keyframes cl-fadein {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Item: open / expanded state ────────────────────────────── */

/* When an item is open the title link gets a red underline cue */
.cl-item.is-open .cl-item__title a {
	color: var(--cl-red);
}

/* Hide the thumbnail column when expanded */
.cl-item.is-open .cl-item__thumb {
	display: none;
}

/* The body stretches to full width automatically once thumb is gone */

/* Excerpt is replaced by full content – hide excerpt when open */
.cl-item.is-open .cl-item__excerpt {
	display: none;
}

/* Detail content panel */
.cl-item__detail {
	overflow: hidden;
	flex-basis: 100%;        /* forces own row in flex-wrap layout */
	width: 100%;

	/* Smooth open/close via max-height transition */
	max-height: 0;
	opacity: 0;
	transition:
		max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
		opacity    0.28s ease;
}

/* Revealed state */
.cl-item.is-open .cl-item__detail {
	max-height: 4000px;      /* generous ceiling; transition duration governs feel */
	opacity: 1;
	margin-top: 14px;
}

/* Spinner shown inside the detail area while loading */
.cl-detail-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 0;
	font-size: 13px;
	color: var(--cl-grey-text);
}

.cl-detail-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid var(--cl-grey-mid);
	border-top-color: var(--cl-red);
	border-radius: 50%;
	animation: cl-spin 0.6s linear infinite;
	flex-shrink: 0;
}

/* Full content typography */
.cl-item__detail-content {
	font-size: 14px;
	line-height: 1.7;
	color: var(--cl-black);
	border-top: 1px solid var(--cl-grey-mid);
	padding-top: 16px;
}

.cl-item__detail-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 12px 0;
}

.cl-item__detail-content p {
	margin: 0 0 12px;
}

.cl-item__detail-content p:last-child {
	margin-bottom: 0;
}

/* Title cursor hint */
.cl-item__title a {
	cursor: pointer;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
	.cl-item {
		flex-direction: column;
		gap: 12px;
	}

	.cl-item__thumb {
		width: 100%;
		flex: none;
	}

	.cl-item__img {
		aspect-ratio: 16 / 7;
	}

	.cl-tax-filters {
		flex-direction: column;
		gap: 14px;
	}
}
