/**
 * MDA Site Tools: Video Spokes ([video_spoke]).
 * Colors come from The7's theme options (CSS variables), with fallbacks.
 *
 * .mda-spoke (.mda-spoke--image-left / --image-right / --no-image / --plain)
 * .mda-spoke__media, .mda-spoke__image-link, .mda-spoke__img, .mda-spoke__play
 * .mda-spoke__content, .mda-spoke__heading, .mda-spoke__copy, .mda-spoke__actions, .mda-spoke__button
 */

.mda-spoke {
	--mda-spoke-accent: var(--the7-accent-bg-color, var(--the7-accent-color, #1e73be));
	--mda-spoke-gap: 30px;
	--mda-spoke-radius: var(--the7-border-radius-size, 0px);
	margin-bottom: var(--mda-spoke-gap);
}

/* Image: full column width, keeps its shape */
.mda-spoke__image-link {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--mda-spoke-radius);
	line-height: 0;
}

.mda-spoke__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.mda-spoke__image-link:hover .mda-spoke__img,
.mda-spoke__image-link:focus-visible .mda-spoke__img {
	transform: scale(1.03);
}

/* Play button over the image, in the theme's accent color */
.mda-spoke__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--mda-play-size, 72px);
	height: var(--mda-play-size, 72px);
	margin: calc(var(--mda-play-size, 72px) / -2) 0 0 calc(var(--mda-play-size, 72px) / -2);
	border-radius: 50%;
	background: var(--mda-spoke-accent);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s ease;
}

.mda-spoke__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -12px 0 0 -7px;
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}

.mda-spoke__image-link:hover .mda-spoke__play,
.mda-spoke__image-link:focus-visible .mda-spoke__play {
	transform: scale(1.1);
}

/* Custom play icon image (Video Hub settings or the element) */
.mda-spoke__play.mda-play--image {
	height: auto;
	margin: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	line-height: 0;
	transform: translate(-50%, -50%);
}

.mda-spoke__play.mda-play--image::after {
	display: none;
}

.mda-spoke__play.mda-play--image img {
	display: block;
	width: 100%;
	height: auto;
	transform: none;
}

.mda-spoke__image-link:hover .mda-spoke__play.mda-play--image,
.mda-spoke__image-link:focus-visible .mda-spoke__play.mda-play--image {
	transform: translate(-50%, -50%) scale(1.1);
}

/* Text color chosen in the element: paragraphs and lists follow it (links keep the theme's color) */
.mda-spoke .mda-spoke__copy.has-color p,
.mda-spoke .mda-spoke__copy.has-color ul,
.mda-spoke .mda-spoke__copy.has-color ol,
.mda-spoke .mda-spoke__copy.has-color li,
.mda-spoke .mda-spoke__copy.has-color strong,
.mda-spoke .mda-spoke__copy.has-color b,
.mda-spoke .mda-spoke__copy.has-color em,
.mda-spoke .mda-spoke__copy.has-color i {
	color: inherit !important;
}

/* Text column */
.mda-spoke__heading {
	margin-top: 0;
}

.mda-spoke__copy > :last-child {
	margin-bottom: 0;
}

.mda-spoke__actions {
	margin: 1.25em 0 0;
}

/* Phones: image on top, then the text (that's the HTML order) */
@media (max-width: 767px) {
	.mda-spoke .mda-spoke__media {
		margin-bottom: 20px;
	}
}

/* Wider screens: image on the right when asked */
@media (min-width: 768px) {
	.vc_row.mda-spoke--image-right {
		flex-direction: row-reverse;
	}
}

/* Without WPBakery: a simple two-column grid */
.mda-spoke--plain {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	align-items: center;
}

@media (min-width: 768px) {
	.mda-spoke--plain {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--mda-spoke-gap);
	}

	.mda-spoke--plain.mda-spoke--image-right .mda-spoke__media {
		order: 2;
	}
}

.mda-spoke--plain.mda-spoke--align-top,
.mda-spoke--plain.mda-spoke--align-default {
	align-items: start;
}

.mda-spoke--plain.mda-spoke--align-bottom {
	align-items: end;
}

.mda-spoke--plain .mda-spoke__media {
	margin-bottom: 0;
}

/* Editor-only notice when a spoke can't be shown */
.mda-spoke-notice {
	padding: 10px 14px;
	border-left: 4px solid var(--mda-spoke-accent, #1e73be);
	background: rgba(0, 0, 0, 0.04);
}

/* Video Hub Featured: stacked rows (each in a .mda-featured__item) and carousel slides */
.mda-featured--stacked {
	display: flex;
	flex-direction: column;
	gap: var(--mda-featured-gap, 50px);
}

@media (max-width: 767px) {
	.mda-featured--stacked {
		gap: var(--mda-featured-gap-phone, var(--mda-featured-gap, 50px));
	}
}

.mda-featured--stacked .mda-spoke {
	margin-bottom: 0;
}

.mda-featured__item[hidden],
.mda-featured__more[hidden] {
	display: none !important;
}

.mda-featured__more {
	text-align: center;
}

.mda-featured--carousel .mda-carousel__slide > .vc_row {
	margin-right: 0;
	margin-left: 0;
}

.mda-featured--carousel .mda-spoke {
	margin-bottom: 0;
}

/* Leave room for the arrows beside the row on wide screens */
@media (min-width: 1101px) {
	.mda-featured--carousel {
		padding: 0 10px;
	}
}

/* "Video (plays right here)": the Vimeo player in the image column */
.mda-spoke__player {
	position: relative;
	overflow: hidden;
	border-radius: var(--mda-spoke-radius);
	background: #000;
	aspect-ratio: 16 / 9;
}

.mda-spoke__player iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Icon inside the spoke button (Button icon option) */
.mda-btn-has-icon {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.mda-btn-icon {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
}

.mda-btn-icon svg {
	width: 1.35em;
	height: 1.35em;
}

.mda-btn-icon--image img {
	width: auto;
	height: 1.35em;
	max-width: none;
	margin: 0;
}
