/* WT26 Publications — frontend styles
 * Used by single + archive templates, the Gutenberg block, the Divi 5 module,
 * and the Breakdance element. Keep theme-agnostic — no Divi/Breakdance/etc.
 * specific selectors here.
 */

/* ---------- Detail (single page + block "show details") ---------- */

.wt26-pub-detail {
	margin: 0 0 1.5rem;
}

.wt26-pub-detail__title {
	margin: 0 0 0.5rem;
}

.wt26-pub-detail__date {
	margin: 0 0 0.5rem;
	font-weight: 600;
	opacity: 0.8;
}

.wt26-pub-detail__authors {
	margin: 0 0 0.5rem;
	font-style: italic;
}

.wt26-pub-detail__summary {
	margin: 0 0 1rem;
}

/* ---------- Archive card / list row ---------- */

.wt26-pub-list {
	display: grid;
	gap: 1.25rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.wt26-pub-list--grid {
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.5rem;
}

.wt26-pub-list--grid .wt26-pub-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.02);
}

.wt26-pub-list--grid .wt26-pub-card__date,
.wt26-pub-list--grid .wt26-pub-card__body,
.wt26-pub-list--grid .wt26-pub-card__resources {
	width: 100%;
}

.wt26-pub-empty {
	padding: 1.5rem;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	text-align: center;
	opacity: 0.7;
}

.wt26-pub-card {
	display: grid;
	grid-template-columns: minmax(7rem, 9rem) 1fr minmax(8rem, 14rem);
	gap: 1rem;
	align-items: start;
	padding: 1rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.wt26-pub-card__date {
	font-weight: 600;
	opacity: 0.8;
}

.wt26-pub-card__body {
	min-width: 0;
}

.wt26-pub-card__title {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	line-height: 1.3;
}

.wt26-pub-card__authors {
	margin: 0 0 0.25rem;
	font-style: italic;
	font-size: 0.95em;
}

.wt26-pub-card__summary {
	margin: 0;
	opacity: 0.85;
}

.wt26-pub-card__resources {
	min-width: 0;
}

@media (max-width: 600px) {
	.wt26-pub-card {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.wt26-pub-card__date {
		order: 2;
		font-size: 0.9em;
	}

	.wt26-pub-card__body {
		order: 1;
	}

	.wt26-pub-card__resources {
		order: 3;
	}
}

/* ---------- Resource list (PDF / video / audio links) ---------- */

.wt26-pub-resources {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.wt26-pub-resources__item a {
	display: inline-block;
	text-decoration: underline;
}

.wt26-pub-resources__item--audio audio {
	width: 100%;
	max-width: 22rem;
}

.wt26-pub-resources__label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
	font-size: 0.95em;
}

/* ---------- Extra Information block (single-page only) ---------- */

.wt26-pub-extra-info {
	margin: 2rem 0 1.5rem;
	padding: 1.5rem 1.75rem;
	border-left: 4px solid #7c3aed;
	background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 70%);
	border-radius: 6px;
}

.wt26-pub-extra-info__heading {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #5b21b6;
	letter-spacing: 0.01em;
}

.wt26-pub-extra-info__body {
	font-size: 1rem;
	line-height: 1.6;
}

.wt26-pub-extra-info__body p:first-child { margin-top: 0; }
.wt26-pub-extra-info__body p:last-child  { margin-bottom: 0; }

.wt26-pub-extra-info__body a {
	color: #6d28d9;
	text-decoration: underline;
}

/* ---------- Live Stream display ----------
 *
 * The outer card carries no background, border, shadow, or padding by
 * default. That chrome is whatever the surrounding wrapper provides —
 * a Divi 5 module wrapper, a Breakdance element, a Gutenberg cover/group,
 * or a theme container. If we paint the outer container here, page-builder
 * design controls (Background Color, Border, etc.) on the wrapping element
 * have nothing visible to control because our inner div sits on top.
 *
 * Sub-elements (badges, the live-stream button, etc.) keep their colored
 * accents — those are intentional contrasting bits, not container chrome,
 * and themes can override them with simple CSS targeting the BEM classes.
 */

.wt26-pub-livestream {
	margin: 1.5rem 0;
}

.wt26-pub-livestream__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
}

.wt26-pub-livestream__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: #be123c;
	color: #fff;
}

.wt26-pub-livestream--live .wt26-pub-livestream__badge::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	animation: wt26-pub-livestream-pulse 1.4s ease-out infinite;
}

.wt26-pub-livestream__badge--upcoming {
	background: #475569;
}

.wt26-pub-livestream__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

.wt26-pub-livestream__when {
	margin: 0.25rem 0 0.5rem;
	font-size: 1rem;
	opacity: 0.85;
}

.wt26-pub-livestream__sep {
	margin: 0 0.4rem;
	opacity: 0.5;
}

.wt26-pub-livestream__tz {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 1px 7px;
	border-radius: 4px;
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: rgba(190, 18, 60, 0.12);
	color: #be123c;
	vertical-align: middle;
}

.wt26-pub-livestream__countdown {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: #be123c;
}

/* JS-driven live ticker. Hidden by default; the countdown JS unhides it on
 * upgrade so JS-disabled visitors still see the humanized text fallback.
 *
 * Coloring is intentionally left to the host theme — we only ship structural
 * layout + a digit-change bounce. Page builders (Divi, Breakdance) can target
 * `.wt26-pub-livestream__pill`, `__pill-num`, `__pill-lbl`, `__pill-sep`, and
 * `__ticker-label` via design controls or custom CSS. */
.wt26-pub-livestream__ticker {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.25rem 0 1.25rem;
}

.wt26-pub-livestream__ticker-label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

.wt26-pub-livestream__ticker-pills {
	display: flex;
	align-items: stretch;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.wt26-pub-livestream__pill {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 84px;
	padding: 0.6rem 0.85rem;
	border: 1px solid currentColor;
	border-radius: 12px;
	line-height: 1;
}

.wt26-pub-livestream__pill-sep {
	display: inline-flex;
	align-items: center;
	font-size: 1.8rem;
	font-weight: 700;
	padding: 0 0.1rem;
	user-select: none;
	opacity: 0.5;
}

.wt26-pub-livestream__pill-num {
	display: inline-block;
	font-size: 2.4rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.03em;
}

.wt26-pub-livestream__pill-num--changed {
	animation: wt26-pub-livestream-flip 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wt26-pub-livestream-flip {
	0%   { transform: translateY(-6px) scale(1.18); opacity: 0.4; }
	60%  { transform: translateY(0) scale(1.08); opacity: 1; }
	100% { transform: translateY(0) scale(1); opacity: 1; }
}

.wt26-pub-livestream__pill-lbl {
	margin-top: 0.35rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
	.wt26-pub-livestream__pill-num--changed {
		animation: none;
	}
}

.wt26-pub-livestream__cta {
	margin: 0.5rem 0 0;
}

.wt26-pub-livestream__btn {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	font-weight: 600;
	background: #be123c;
	color: #fff !important;
	border-radius: 6px;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.wt26-pub-livestream__btn:hover {
	background: #9f1239;
	transform: translateY(-1px);
}

.wt26-pub-livestream__player {
	margin-top: 0.5rem;
	border-radius: 8px;
	overflow: hidden;
}

.wt26-pub-livestream__player iframe,
.wt26-pub-livestream__oembed iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto !important;
	border: 0;
}

.wt26-pub-livestream__fallback a {
	font-weight: 600;
}

.wt26-pub-livestream__empty {
	padding: 1rem 1.25rem;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	color: #6b7280;
	background: #f9fafb;
}

@keyframes wt26-pub-livestream-pulse {
	0%   { opacity: 1; transform: scale(1); }
	50%  { opacity: 0.5; transform: scale(0.85); }
	100% { opacity: 1; transform: scale(1); }
}

/* ---------- Pagination (used by block + archive templates) ---------- */

.wt26-pub-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin: 1.5rem 0;
}

.wt26-pub-pagination .page-numbers {
	display: inline-block;
	padding: 0.35em 0.7em;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 3px;
	text-decoration: none;
}

.wt26-pub-pagination .page-numbers.current {
	background: currentColor;
	color: #fff;
}
