/* ============================================================
   Event Programme — Frontend styles
   Theming via CSS variables; override in your theme to rebrand.

   Tab colours (per brand spec):
     Active tab:   background #A9CA4C, text white
     Inactive tab: background white, text dark
     Hover tab:    background white, slightly darker text
   ============================================================ */

.ep-programme,
.ep-speakers-grid {
	--ep-color-accent: #A9CA4C;
	--ep-color-accent-dark: #8aaa30;
	--ep-color-text: #1f2937;
	--ep-color-muted: #6b7280;
	--ep-color-border: #e5e7eb;
	--ep-color-bg: #ffffff;
	--ep-color-bg-alt: #f8fafc;
	--ep-tab-active-bg: #A9CA4C;
	--ep-tab-active-text: #ffffff;
	--ep-tab-inactive-bg: #ffffff;
	--ep-tab-inactive-text: #1f2937;
	--ep-tab-hover-bg: #ffffff;
	--ep-tab-hover-text: #A9CA4C;
	--ep-radius: 8px;
	--ep-gap: 16px;
	--ep-font: inherit;

	font-family: var(--ep-font);
	color: var(--ep-color-text);
	box-sizing: border-box;
}

.ep-programme *, .ep-programme *::before, .ep-programme *::after,
.ep-speakers-grid *, .ep-speakers-grid *::before, .ep-speakers-grid *::after {
	box-sizing: inherit;
}

/* -------- Tabs -------- */
.ep-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--ep-color-border);
}

.ep-tab {
	background: var(--ep-tab-inactive-bg);
	color: var(--ep-tab-inactive-text);
	border: 1px solid var(--ep-color-border);
	border-bottom: 0;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	margin-bottom: -2px;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ep-tab:hover {
	background: var(--ep-tab-hover-bg);
	color: var(--ep-tab-hover-text);
}

.ep-tab.is-active {
	background: var(--ep-tab-active-bg);
	color: var(--ep-tab-active-text);
	border-color: var(--ep-tab-active-bg);
}

.ep-day-panel { display: none; }
.ep-day-panel.is-active { display: block; }

/* -------- Day section (timeline / accordion) -------- */
.ep-day-section { margin-bottom: 40px; }

.ep-day-section__header {
	border-bottom: 2px solid var(--ep-color-accent);
	padding-bottom: 8px;
	margin-bottom: 20px;
	display: flex;
	align-items: baseline;
	gap: 16px;
}

.ep-day-section__header h3 {
	margin: 0;
	font-size: 22px;
}

.ep-day-section__header time {
	color: var(--ep-color-muted);
	font-size: 14px;
}

/* -------- Session card -------- */
.ep-session {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 20px;
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	padding: 18px 20px;
	margin-bottom: 14px;
}

.ep-session__time {
	font-weight: 700;
	color: var(--ep-color-accent-dark);
	font-size: 15px;
}

.ep-session__title {
	margin: 0 0 6px;
	font-size: 17px;
	line-height: 1.35;
}

.ep-session__location {
	font-size: 13px;
	color: var(--ep-color-muted);
	margin-bottom: 8px;
}

.ep-session__location .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 2px;
}

.ep-session__desc {
	font-size: 15px;
	line-height: 1.55;
	margin-bottom: 12px;
}

.ep-session__desc p:last-child { margin-bottom: 0; }

/* -------- Sponsor block -------- */
.ep-session__sponsor {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding: 10px 16px;
	margin: 12px 0 16px;
	background: var(--ep-color-bg-alt);
	border: 1px solid var(--ep-color-border);
	border-radius: 6px;
	max-width: 100%;
}

.ep-session__sponsor-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ep-color-muted);
	flex-shrink: 0;
}

.ep-session__sponsor-img {
	max-height: 50px;
	width: auto;
	max-width: 200px;
	height: auto;
	display: block;
}

/* Session variants */
.ep-session--break {
	background: var(--ep-color-bg-alt);
	border-style: dashed;
}
.ep-session--break .ep-session__title {
	font-style: italic;
	color: var(--ep-color-muted);
}

.ep-session--social {
	background: #fef9e7;
	border-color: #f4d97c;
}

.ep-session--plenary {
	border-left: 4px solid var(--ep-color-accent);
}

/* -------- Slots (rows inside session) -------- */
.ep-session__slots {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ep-slot {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	background: var(--ep-color-bg-alt);
	border-radius: 6px;
	font-size: 14px;
}

.ep-slot__time {
	flex: 0 0 70px;
	font-weight: 700;
	color: var(--ep-color-accent-dark);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.ep-slot__photo {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.ep-slot__photo--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ep-color-accent);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
}

.ep-slot__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.4;
}

.ep-slot__title {
	font-weight: 600;
	color: var(--ep-color-text);
	margin-bottom: 2px;
}

.ep-slot__speaker {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.ep-slot__name {
	font-weight: 600;
	color: var(--ep-color-text);
	font-size: 14px;
	white-space: nowrap;
}

.ep-slot__role {
	color: var(--ep-color-muted);
	font-size: 12px;
}

@media (max-width: 540px) {
	.ep-slot {
		flex-wrap: wrap;
		gap: 8px;
	}
	.ep-slot__photo {
		order: -1;
	}
	.ep-slot__name {
		white-space: normal;
	}
}

/* -------- Parallel sessions -------- */
.ep-parallel {
	display: grid;
	gap: var(--ep-gap);
	margin-bottom: 14px;
}

.ep-parallel--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ep-parallel--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ep-parallel--cols-4 { grid-template-columns: repeat(4, 1fr); }

.ep-parallel .ep-session {
	margin-bottom: 0;
	grid-template-columns: 90px 1fr;
}

@media (max-width: 768px) {
	.ep-parallel--cols-2,
	.ep-parallel--cols-3,
	.ep-parallel--cols-4 { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
	.ep-session { grid-template-columns: 1fr; gap: 6px; }
}

/* -------- Accordion -------- */
.ep-accordion-item {
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	margin-bottom: 8px;
}

.ep-accordion-item__summary {
	display: grid;
	grid-template-columns: 120px 1fr auto;
	gap: 16px;
	padding: 14px 18px;
	cursor: pointer;
	list-style: none;
	font-weight: 500;
	align-items: center;
}
.ep-accordion-item__summary::-webkit-details-marker { display: none; }
.ep-accordion-item__summary::after {
	content: "+";
	font-size: 22px;
	color: var(--ep-color-muted);
	line-height: 1;
}
.ep-accordion-item[open] .ep-accordion-item__summary::after { content: "−"; }

.ep-accordion-item__body { padding: 0 18px 16px 138px; }

@media (max-width: 540px) {
	.ep-accordion-item__summary { grid-template-columns: 1fr auto; }
	.ep-accordion-item__body { padding: 0 16px 16px; }
}

.ep-empty {
	color: var(--ep-color-muted);
	font-style: italic;
}

/* ============================================================
   Speakers grid
   ============================================================ */
.ep-speakers-grid {
	display: grid;
	gap: 24px;
	margin: 24px 0;
}

.ep-speakers-grid--cols-1 { grid-template-columns: 1fr; }
.ep-speakers-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ep-speakers-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ep-speakers-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.ep-speakers-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.ep-speakers-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.ep-speakers-grid--cols-4,
	.ep-speakers-grid--cols-5,
	.ep-speakers-grid--cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.ep-speakers-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
	.ep-speakers-grid { grid-template-columns: 1fr !important; }
}

.ep-speaker-card {
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ep-speaker-card__photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	background: var(--ep-color-bg-alt);
}

.ep-speaker-card__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	font-weight: 700;
	color: #fff;
	background: var(--ep-color-accent);
}

.ep-speaker-card__body { padding: 16px; }
.ep-speaker-card__name { margin: 0 0 4px; font-size: 18px; line-height: 1.3; }
.ep-speaker-card__role { margin: 0; font-size: 14px; }
.ep-speaker-card__company { margin: 0 0 8px; font-size: 14px; color: var(--ep-color-muted); }
.ep-speaker-card__bio { font-size: 14px; color: var(--ep-color-muted); margin-bottom: 8px; }
.ep-speaker-card__linkedin {
	display: inline-block;
	font-size: 13px;
	color: var(--ep-color-accent-dark);
	text-decoration: none;
}
.ep-speaker-card__linkedin:hover { text-decoration: underline; }

/* ============================================================
   Advanced speakers shortcode — grid + list + modal
   ============================================================ */

.ep-speakers {
	--ep-color-accent: #A9CA4C;
	--ep-color-accent-dark: #8aaa30;
	--ep-color-text: #1f2937;
	--ep-color-muted: #6b7280;
	--ep-color-border: #e5e7eb;
	--ep-color-bg: #ffffff;
	--ep-color-bg-alt: #f8fafc;
	--ep-radius: 8px;
	margin: 24px 0;
	color: var(--ep-color-text);
	box-sizing: border-box;
}

.ep-speakers *,
.ep-speakers *::before,
.ep-speakers *::after { box-sizing: inherit; }

.ep-speakers__photo {
	display: block;
	object-fit: cover;
	background: var(--ep-color-bg-alt);
}

.ep-speakers__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: var(--ep-color-accent);
	font-weight: 700;
}

/* ----- Grid ----- */
.ep-speakers--grid {
	display: grid;
	gap: 24px;
}

.ep-speakers--cols-1 { grid-template-columns: 1fr; }
.ep-speakers--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ep-speakers--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ep-speakers--cols-4 { grid-template-columns: repeat(4, 1fr); }
.ep-speakers--cols-5 { grid-template-columns: repeat(5, 1fr); }
.ep-speakers--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.ep-speakers--cols-4,
	.ep-speakers--cols-5,
	.ep-speakers--cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.ep-speakers--grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
	.ep-speakers--grid { grid-template-columns: 1fr !important; }
}

.ep-speaker-grid-card {
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ep-speaker-grid-card .ep-speakers__photo {
	width: 100%;
	aspect-ratio: 1 / 1;
}

.ep-speaker-grid-card .ep-speakers__photo--placeholder { font-size: 48px; }

.ep-speaker-grid-card__body { padding: 16px; }

.ep-speaker-grid-card__name {
	margin: 0 0 4px;
	font-size: 18px;
	line-height: 1.3;
}

.ep-speaker-grid-card__role {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
}

.ep-speaker-grid-card__company {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--ep-color-muted);
}

.ep-speaker-grid-card__bio-link {
	background: transparent;
	border: 0;
	color: var(--ep-color-accent-dark);
	font-size: 13px;
	font-weight: 600;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
}

.ep-speaker-grid-card__bio-link:hover { color: var(--ep-color-accent); }

.ep-speaker-grid-card__linkedin {
	display: inline-block;
	margin-left: 12px;
	font-size: 13px;
	color: var(--ep-color-accent-dark);
	text-decoration: none;
}
.ep-speaker-grid-card__linkedin:hover { text-decoration: underline; }

/* ----- List ----- */
.ep-speakers--list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ep-speaker-list-row {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 24px;
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	padding: 20px;
}

.ep-speaker-list-row__media .ep-speakers__photo {
	width: 160px;
	height: 160px;
	border-radius: var(--ep-radius);
}

.ep-speaker-list-row__media .ep-speakers__photo--placeholder { font-size: 48px; }

.ep-speaker-list-row__name {
	margin: 0 0 4px;
	font-size: 20px;
}

.ep-speaker-list-row__role {
	margin: 0 0 12px;
	color: var(--ep-color-muted);
	font-size: 15px;
}

.ep-speaker-list-row__bio {
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 8px;
}

.ep-speaker-list-row__bio p:last-child { margin-bottom: 0; }

.ep-speaker-list-row__linkedin {
	display: inline-block;
	font-size: 13px;
	color: var(--ep-color-accent-dark);
	text-decoration: none;
}
.ep-speaker-list-row__linkedin:hover { text-decoration: underline; }

@media (max-width: 540px) {
	.ep-speaker-list-row {
		grid-template-columns: 1fr;
		gap: 14px;
		text-align: center;
	}
	.ep-speaker-list-row__media .ep-speakers__photo {
		width: 140px;
		height: 140px;
		margin: 0 auto;
	}
}

/* ----- Modal ----- */
.ep-speaker-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	overflow-y: auto;
}

.ep-speaker-modal.is-open {
	display: flex;
}

.ep-speaker-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ep-speaker-modal__panel {
	position: relative;
	max-width: 640px;
	width: 100%;
	background: #fff;
	border-radius: 12px;
	padding: 28px 32px 32px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	color: #1f2937;
}

.ep-speaker-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: 0;
	font-size: 32px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	padding: 4px 10px;
}

.ep-speaker-modal__close:hover { color: #1f2937; }

.ep-speaker-modal__header {
	display: flex;
	gap: 20px;
	align-items: center;
	margin-bottom: 18px;
	padding-right: 30px;
}

.ep-speaker-modal__photo {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #f8fafc;
}

.ep-speaker-modal__heading { min-width: 0; }

.ep-speaker-modal__name {
	margin: 0 0 4px;
	font-size: 22px;
	line-height: 1.2;
}

.ep-speaker-modal__role {
	margin: 0 0 6px;
	color: #6b7280;
	font-size: 15px;
}

.ep-speaker-modal__linkedin {
	font-size: 13px;
	color: #8aaa30;
	text-decoration: none;
}
.ep-speaker-modal__linkedin:hover { text-decoration: underline; }

.ep-speaker-modal__bio {
	font-size: 15px;
	line-height: 1.6;
}

.ep-speaker-modal__bio p:last-child { margin-bottom: 0; }

body.ep-modal-open { overflow: hidden; }

/* ============================================================
   Presentations grid (download cards)
   ============================================================ */

.ep-presentations {
	--ep-color-accent: #A9CA4C;
	--ep-color-accent-dark: #8aaa30;
	--ep-color-text: #1f2937;
	--ep-color-muted: #6b7280;
	--ep-color-border: #e5e7eb;
	--ep-color-bg: #ffffff;
	--ep-color-bg-alt: #f8fafc;
	--ep-radius: 10px;

	display: grid;
	gap: 24px;
	margin: 24px 0;
	color: var(--ep-color-text);
	box-sizing: border-box;
}

.ep-presentations *,
.ep-presentations *::before,
.ep-presentations *::after { box-sizing: inherit; }

.ep-presentations--cols-1 { grid-template-columns: 1fr; }
.ep-presentations--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ep-presentations--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ep-presentations--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
	.ep-presentations--cols-3,
	.ep-presentations--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.ep-presentations { grid-template-columns: 1fr !important; }
}

.ep-presentation-card {
	background: var(--ep-color-bg);
	border: 1px solid var(--ep-color-border);
	border-radius: var(--ep-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s, transform 0.15s;
	position: relative;
}

.ep-presentation-card:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ep-presentation-card__media {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--ep-color-bg-alt);
	border-bottom: 1px solid var(--ep-color-border);
	position: relative;
	overflow: hidden;
}

.ep-presentation-card__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ep-presentation-card__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 56px;
	font-weight: 700;
	color: #fff;
	background: var(--ep-color-accent);
	width: 100%;
	height: 100%;
}

.ep-presentation-card__body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ep-presentation-card__title {
	margin: 0 0 6px;
	font-size: 17px;
	line-height: 1.35;
	color: var(--ep-color-text);
}

.ep-presentation-card__session {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ep-color-accent-dark);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ep-presentation-card__speaker {
	margin: 0 0 14px;
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.ep-presentation-card__name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ep-color-text);
}

.ep-presentation-card__role {
	font-size: 12px;
	color: var(--ep-color-muted);
}

.ep-presentation-card__meta {
	display: flex;
	gap: 10px;
	font-size: 11px;
	color: var(--ep-color-muted);
	margin-bottom: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.ep-presentation-card__filetype {
	background: var(--ep-color-bg-alt);
	padding: 3px 8px;
	border-radius: 4px;
	color: var(--ep-color-accent-dark);
}

.ep-presentation-card__filesize {
	display: flex;
	align-items: center;
}

.ep-presentation-card__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	padding: 10px 18px;
	background: var(--ep-color-accent);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.15s;
}

.ep-presentation-card__download:hover,
.ep-presentation-card__download:focus {
	background: var(--ep-color-accent-dark);
	color: #fff;
	text-decoration: none;
}
