/* OCW Conference – front-end helpers.
   Colours use Elementor global variables when set, with neutral fallbacks. */

/* ---------- Hide empty sections ----------
   Give a container the class "ocw-sponsor-tier" (sponsor tiers) or "ocw-hide-if-empty"
   (anything else). If its Loop Grid has no items, the whole container disappears. */
.ocw-sponsor-tier:not(:has(.e-loop-item)),
.ocw-hide-if-empty:not(:has(.e-loop-item)) {
	display: none !important;
}

/* ---------- Sponsor logos ([ocw_sponsor_logo]) ---------- */
.ocw-sponsor {
	width: 100%;
}
.ocw-sponsor__link {
	display: block;
	border-radius: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ocw-sponsor__link:hover,
.ocw-sponsor__link:focus-visible {
	transform: translateY(-2px);
}
.ocw-sponsor__link:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #7a1f3d);
	outline-offset: 3px;
}
.ocw-sponsor__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--ocw-sponsor-border, #d9dee5);
	overflow: hidden;
}
.ocw-sponsor__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.ocw-sponsor__name {
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
}

/* Plain (default): no box; logo sits in an invisible slot (3:2 unless ratio="…") and grows on hover. */
.ocw-sponsor--plain .ocw-sponsor__frame {
	aspect-ratio: var(--ocw-sponsor-ratio, 3 / 2);
	padding: var(--ocw-sponsor-padding, 8%);
	background: transparent;
	border: 0;
	border-radius: 0;
	overflow: visible;
}
.ocw-sponsor--plain .ocw-sponsor__link:hover,
.ocw-sponsor--plain .ocw-sponsor__link:focus-visible {
	transform: none;
}
.ocw-sponsor--plain .ocw-sponsor__img {
	width: 100%;
	height: 100%;
	transition: transform 0.2s ease;
}
.ocw-sponsor--plain .ocw-sponsor__link:hover .ocw-sponsor__img,
.ocw-sponsor--plain .ocw-sponsor__link:focus-visible .ocw-sponsor__img {
	transform: scale(var(--ocw-sponsor-hover-scale, 1.08));
}
@media (prefers-reduced-motion: reduce) {
	.ocw-sponsor__link,
	.ocw-sponsor__img {
		transition: none;
	}
}

/* Circle: logo sits inside with padding so wide logos aren't cropped. */
.ocw-sponsor--circle .ocw-sponsor__link,
.ocw-sponsor--circle .ocw-sponsor__frame {
	border-radius: 50%;
}
.ocw-sponsor--circle .ocw-sponsor__frame {
	aspect-ratio: 1 / 1;
	padding: 16%;
}
.ocw-sponsor--circle .ocw-sponsor__link:hover .ocw-sponsor__frame,
.ocw-sponsor--circle .ocw-sponsor__link:focus-visible .ocw-sponsor__frame {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Banner (Title tier): full width, wide logo. */
.ocw-sponsor--banner .ocw-sponsor__frame {
	border-radius: 8px;
	padding: clamp(16px, 4vw, 40px);
	min-height: 160px;
}
.ocw-sponsor--banner .ocw-sponsor__img {
	max-height: 220px;
}

/* Tiers: center the logos however many there are; each keeps the Loop Grid's column width. */
.ocw-sponsor-tier .elementor-loop-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
.ocw-sponsor-tier .elementor-loop-container > .e-loop-item {
	width: calc((100% - (var(--grid-columns, 4) - 1) * var(--grid-column-gap, 20px)) / var(--grid-columns, 4));
}

/* ---------- Speakers & sessions ---------- */
.ocw-speaker-meta {
	display: block;
}
.ocw-session-people {
	display: grid;
	gap: 0.25em;
}
.ocw-session-people .ocw-label {
	font-weight: 600;
}
.ocw-session-role {
	display: inline-block;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ---------- Checkout: attendee details ---------- */
.ocw-attendees {
	clear: both;
	margin: 2em 0;
}
.ocw-attendees__intro {
	margin-bottom: 1em;
}
.ocw-attendee {
	border: 1px solid var(--ocw-sponsor-border, #d9dee5);
	border-radius: 4px;
	padding: 1em 1.25em 0.25em;
	margin: 0 0 1.25em;
}
.ocw-attendee legend {
	padding: 0 0.4em;
	font-weight: 600;
	color: var(--e-global-color-secondary, #aa2959);
}
.ocw-attendee .form-row-first,
.ocw-attendee .form-row-last {
	width: 48%;
}
@media (max-width: 600px) {
	.ocw-attendee .form-row-first,
	.ocw-attendee .form-row-last {
		width: 100%;
		float: none;
	}
}

/* ---------- Session details ([ocw_session_room], [ocw_session_type], [ocw_session_speakers]) ---------- */
.ocw-session-room {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.ocw-icon {
	flex: none;
}
.ocw-session-type {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ocw-pill {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--ocw-pill-bg, #8a8f94);
	color: var(--ocw-pill-color, #fff);
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.6;
}
.ocw-session-speakers__heading {
	margin-bottom: 8px;
	font-size: 0.9em;
}
.ocw-people {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.ocw-person {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
}
.ocw-person__photo-link {
	flex: none;
	line-height: 0;
}
.ocw-person__photo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.ocw-person__photo--empty {
	background: #d9dee5;
}
.ocw-person__text {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}
.ocw-person__name {
	font-weight: 600;
	text-decoration: none;
}
.ocw-person__name:hover,
.ocw-person__name:focus-visible {
	text-decoration: underline;
}
.ocw-person__role {
	font-size: 0.85em;
	opacity: 0.75;
}
.ocw-person__meta {
	font-size: 0.85em;
	opacity: 0.8;
}

/* ---------- Speaker cards ([ocw_keynote_label], [ocw_speaker_sessions_list]) ---------- */
.ocw-keynote-label {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ocw-speaker-sessions {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
	font-size: 0.9em;
	line-height: 1.35;
	min-width: 0;
}
.ocw-speaker-session {
	margin: 0;
	min-width: 0;
}
.ocw-speaker-session__title {
	display: block;
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ocw-speaker-session__meta {
	display: block;
	font-size: 0.9em;
	opacity: 0.8;
}
.ocw-speaker-session--more {
	font-size: 0.9em;
	opacity: 0.8;
}

/* Checkout: attendee 1's name, email and company are hidden while "I'm attending" is ticked. */
.ocw-attendee .ocw-is-hidden {
	display: none !important;
}

/* Session titles on speaker cards link to the session page: wine on hover. */
a.ocw-speaker-session__title:hover,
a.ocw-speaker-session__title:focus-visible {
	color: var(--e-global-color-secondary, #AA2959);
}

/* ---------- [ocw_session_sponsor] ---------- */
.ocw-session-sponsor__label {
	font-size: 0.8em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
	margin-bottom: 6px;
}
.ocw-session-sponsor__logos {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
}
.ocw-session-sponsor__logos .ocw-sponsor {
	width: var(--ocw-session-sponsor-width, 160px);
}
.ocw-session-sponsor--text a {
	color: inherit;
	font-weight: 600;
}
.ocw-session-sponsor--text a:hover,
.ocw-session-sponsor--text a:focus-visible {
	color: var(--e-global-color-secondary, #AA2959);
}
