/**
 * Inoforest Video Button
 *
 * Contents
 * 1. Root (variables) and stage
 * 2. Link, round button and text
 * 3. Pulse rings
 * 4. Video box: image, overlay, badge
 * 5. Editor hint
 * 6. Phones, reduced motion
 *
 * Colours read the Design System (--inoforest-color-*) with the HTML design's values as fallbacks. Hover rules sit
 * one step below the panel's hover controls, so a colour picked in the Style tab always wins.
 */

/* 1. Root and stage ---------------------------------------------------------- */
.inoforest-video-button {
	--ino-vbtn-size: 84px;
	--ino-vbtn-icon-size: 20px;
	--ino-vbtn-align: center;
	--ino-vbtn-hover-scale: 1.06;
	--ino-vbtn-ring-color: rgba(255, 255, 255, 0.7);
	--ino-vbtn-ring-width: 2px;
	--ino-vbtn-ring-scale: 1.9;
	--ino-vbtn-ring-duration: 2.4s;
	--ino-vbtn-text-gap: 20px;
	--ino-vbtn-box-height: 580px;
	--ino-vbtn-box-radius: 24px;
	--ino-vbtn-overlay-top: rgba(13, 27, 42, 0.1);
	--ino-vbtn-overlay-bottom: rgba(13, 27, 42, 0.55);
	--ino-vbtn-overlay: rgba(13, 27, 42, 0.55);
	--ino-vbtn-badge-offset: 24px;
	--ino-vbtn-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	position: relative;
}

.inoforest-video-button__stage {
	display: flex;
	align-items: center;
	justify-content: var(--ino-vbtn-align);
}

/* 2. Link, round button and text ----------------------------------------------- */
.inoforest-video-button .inoforest-video-button__link {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: var(--ino-vbtn-text-gap);
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 0;
}

.inoforest-video-button:where([data-text-position="below"]) .inoforest-video-button__link {
	flex-direction: column;
}

.inoforest-video-button .inoforest-video-button__link:disabled {
	cursor: default;
	opacity: 0.6;
}

.inoforest-video-button .inoforest-video-button__button {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: var(--ino-vbtn-size);
	height: var(--ino-vbtn-size);
	font-size: var(--ino-vbtn-icon-size);
	line-height: 1;
	color: var(--inoforest-color-accent, #ff6a3d);
	background-color: #fff;
	border: 0 solid transparent;
	border-radius: 50%;
	transition: transform 0.35s var(--ino-vbtn-ease), color 0.35s var(--ino-vbtn-ease), background-color 0.35s var(--ino-vbtn-ease), border-color 0.35s var(--ino-vbtn-ease), box-shadow 0.35s var(--ino-vbtn-ease);
}

.inoforest-video-button__button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Font Awesome's play triangle sits left of centre; nudge it to the optical centre. */
.inoforest-video-button__button .e-fas-play,
.inoforest-video-button__button .fa-play {
	margin-left: 0.12em;
}

.inoforest-video-button .inoforest-video-button__link:not(:disabled):hover .inoforest-video-button__button,
.inoforest-video-button .inoforest-video-button__link:focus-visible .inoforest-video-button__button {
	transform: scale(var(--ino-vbtn-hover-scale));
}

.inoforest-video-button .inoforest-video-button__link:focus-visible {
	outline: none;
}

.inoforest-video-button .inoforest-video-button__link:focus-visible .inoforest-video-button__button {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.inoforest-video-button__text {
	font-weight: 700;
	line-height: 1.3;
	transition: color 0.35s var(--ino-vbtn-ease);
}

/* 3. Pulse rings ----------------------------------------------------------------- */
.inoforest-video-button:where([data-pulse="true"]) .inoforest-video-button__button::before,
.inoforest-video-button:where([data-pulse="true"]) .inoforest-video-button__button::after {
	position: absolute;
	inset: 0;
	pointer-events: none;
	content: "";
	border: var(--ino-vbtn-ring-width) solid var(--ino-vbtn-ring-color);
	border-radius: inherit;
	animation: ino-vbtn-ripple var(--ino-vbtn-ring-duration) linear infinite;
}

.inoforest-video-button:where([data-pulse="true"]) .inoforest-video-button__button::after {
	animation-delay: calc(var(--ino-vbtn-ring-duration) / 2);
}

@keyframes ino-vbtn-ripple {

	from {
		opacity: 1;
		transform: scale(1);
	}

	to {
		opacity: 0;
		transform: scale(var(--ino-vbtn-ring-scale));
	}
}

/* 4. Video box ------------------------------------------------------------------- */
.inoforest-video-button:where([data-has-image="true"]) {
	min-height: var(--ino-vbtn-box-height);
}

.inoforest-video-button__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: var(--ino-vbtn-box-radius);
}

/* Two classes to beat Elementor's `.elementor img` reset. */
.inoforest-video-button .inoforest-video-button__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.inoforest-video-button__media::after {
	position: absolute;
	inset: 0;
	pointer-events: none;
	content: "";
}

.inoforest-video-button__media[data-overlay="gradient"]::after {
	background: linear-gradient(180deg, var(--ino-vbtn-overlay-top), var(--ino-vbtn-overlay-bottom));
}

.inoforest-video-button__media[data-overlay="color"]::after {
	background: var(--ino-vbtn-overlay);
}

.inoforest-video-button:where([data-has-image="true"]) .inoforest-video-button__stage {
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: 24px;
	color: #fff;
}

.inoforest-video-button__badge {
	position: absolute;
	bottom: var(--ino-vbtn-badge-offset);
	left: var(--ino-vbtn-badge-offset);
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 22px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.85);
	background-color: rgba(13, 27, 42, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.inoforest-video-button__badge-icon {
	display: inline-flex;
	flex: none;
	line-height: 1;
	color: #fff;
}

.inoforest-video-button__badge-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.inoforest-video-button .inoforest-video-button__badge-number {
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1;
	color: #fff;
}

/* 5. Editor hint ------------------------------------------------------------------ */
.inoforest-video-button__hint {
	margin: 10px 0 0;
	font-size: 0.85rem;
	text-align: center;
}

/* 6. Phones, reduced motion ----------------------------------------------------------- */
@media (max-width: 767px) {

	.inoforest-video-button {
		--ino-vbtn-badge-offset: 16px;
	}

	.inoforest-video-button__badge {
		padding: 12px 16px;
		font-size: 0.9375rem; /* the design's 15 px phone base */
	}

	.inoforest-video-button .inoforest-video-button__badge-number {
		font-size: 1.7rem;
	}
}

@media (prefers-reduced-motion: reduce) {

	.inoforest-video-button .inoforest-video-button__button,
	.inoforest-video-button__text {
		transition: none;
	}

	.inoforest-video-button .inoforest-video-button__button::before,
	.inoforest-video-button .inoforest-video-button__button::after {
		display: none;
		animation: none;
	}

	.inoforest-video-button .inoforest-video-button__link:not(:disabled):hover .inoforest-video-button__button {
		transform: none;
	}
}
