/* SEO Box for Elementor — Show More / Show Less
 * Author: Vahid Eslami
 */

.vhd-seo-box {
	--vhd-fade-color: #ffffff;
	position: relative;
}

.vhd-seo-box__text-wrap {
	overflow: hidden;
	position: relative;
	transition: max-height ease-in-out var(--vhd-speed, 0.35s);
}

.vhd-seo-box__text {
	line-height: 1.7;
}

.vhd-seo-box__text > *:first-child {
	margin-top: 0;
}

.vhd-seo-box__text > *:last-child {
	margin-bottom: 0;
}

/* Fade overlay hint while collapsed */
.vhd-seo-box--fade .vhd-seo-box__text-wrap.vhd-is-collapsed::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1.7em;
	background: linear-gradient( to bottom, rgba( 255, 255, 255, 0 ), var( --vhd-fade-color ) 85% );
	pointer-events: none;
}

.vhd-seo-box__toggle-wrap {
	display: flex;
	margin-top: 10px;
}

.vhd-seo-box__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.4;
	color: #1565c0;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.vhd-seo-box__toggle:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.vhd-seo-box__toggle-icon {
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
	transition: transform 0.25s ease;
	display: inline-block;
}

.vhd-seo-box__toggle[aria-expanded="true"] .vhd-seo-box__toggle-icon {
	transform: rotate(180deg);
}

/* Widget is not yet measured by JS (avoids a flash of fully expanded text) */
.vhd-seo-box__text-wrap.vhd-is-measuring {
	max-height: none !important;
	overflow: visible;
}

/* If JS has determined the text does not overflow, hide the toggle entirely */
.vhd-seo-box__toggle-wrap.vhd-is-hidden {
	display: none;
}
