/**
 * Floating Highlights Block — frontend styles.
 *
 * Design reference: .hero-art section with floating badges
 * from docs/home/09_alonepro-education-home.html
 */

/* Block root */
.alonepro-floating-highlights,
.alonepro-floating-highlights *,
.alonepro-floating-highlights *::before,
.alonepro-floating-highlights *::after {
	box-sizing: border-box;
}

.alonepro-floating-highlights {
	position: relative;
	max-width: 100%;
}

/* Loading state — badges hidden until JS inits */
.alonepro-floating-highlights--loading .alonepro-floating-highlights__badge {
	opacity: 0;
}

.alonepro-floating-highlights--ready .alonepro-floating-highlights__badge {
	opacity: 1;
}

/* Main image container — overflow visible so badges extend outside image bounds */
.alonepro-floating-highlights__media {
	position: relative;
	overflow: visible;
}

/* Image wrapper — clips image and blob to border-radius */
.alonepro-floating-highlights__image-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 30px;
	box-shadow: 0 30px 70px -30px rgb(from var(--wp--preset--color--contrast) r g b / 0.45);
}

/* Main image */
.alonepro-floating-highlights__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: relative;
	z-index: 1;
}

/* Decorative blob behind image */
.alonepro-floating-highlights__blob {
	position: absolute;
	inset: -15% -10%;
	z-index: 0;
	border-radius: 57% 43% 36% 64% / 50% 38% 62% 50%;
	background: linear-gradient(135deg,
			var(--wp--preset--color--surface),
			var(--wp--preset--color--base));
}

/* Floating stat badges */
.alonepro-floating-highlights__badge {
	position: absolute;
	z-index: 2;
	background: var(--wp--preset--color--base);
	border-radius: 18px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 11px;
	box-shadow: 0 12px 32px -8px rgb(from var(--wp--preset--color--contrast) r g b / 0.18);
	white-space: nowrap;
	transition: opacity 400ms ease, transform 400ms ease;
}

/* Badge positions */
.alonepro-floating-highlights__badge--tl {
	top: 6%;
	left: -14px;
}

.alonepro-floating-highlights__badge--br {
	bottom: 8%;
	right: -12px;
}

/* Icon circle */
.alonepro-floating-highlights__icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--base);
	flex-shrink: 0;
}

.alonepro-floating-highlights__icon svg {
	width: 20px;
	height: 20px;
	display: block;
	margin: auto;
}

/* Badge title */
.alonepro-floating-highlights__badge b {
	display: block;
	font-weight: 700;
	letter-spacing: normal;
}

.alonepro-floating-highlights__badge b:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--base);
}

.alonepro-floating-highlights__badge b:not(.has-text-color) {
	color: var(--wp--preset--color--contrast);
}

/* Badge subtitle */
.alonepro-floating-highlights__badge span:not(.alonepro-floating-highlights__icon) {
	display: block;
	font-weight: 400;
}

.alonepro-floating-highlights__badge span:not(.alonepro-floating-highlights__icon):not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--small);
}

.alonepro-floating-highlights__badge span:not(.alonepro-floating-highlights__icon):not(.has-text-color) {
	color: var(--wp--preset--color--paragraph);
}

/* Slide animations */
.alonepro-floating-highlights__badge--slide-out-right {
	opacity: 0;
	transform: translateX(-30px);
	pointer-events: none;
}

.alonepro-floating-highlights__badge--slide-in-right {
	opacity: 0;
	transform: translateX(30px);
}

.alonepro-floating-highlights__badge--slide-out-left {
	opacity: 0;
	transform: translateX(30px);
	pointer-events: none;
}

.alonepro-floating-highlights__badge--slide-in-left {
	opacity: 0;
	transform: translateX(-30px);
}

.alonepro-floating-highlights__badge--slide-out-top {
	opacity: 0;
	transform: translateY(-30px);
	pointer-events: none;
}

.alonepro-floating-highlights__badge--slide-in-top {
	opacity: 0;
	transform: translateY(30px);
}

.alonepro-floating-highlights__badge--slide-out-bottom {
	opacity: 0;
	transform: translateY(30px);
	pointer-events: none;
}

.alonepro-floating-highlights__badge--slide-in-bottom {
	opacity: 0;
	transform: translateY(-30px);
}

.alonepro-floating-highlights__badge--fade-out {
	opacity: 0;
	pointer-events: none;
}

.alonepro-floating-highlights__badge--fade-in {
	opacity: 0;
}

/* Responsive */
@media (max-width: 640px) {
	.alonepro-floating-highlights__badge {
		padding: 8px 12px;
		gap: 8px;
		border-radius: 14px;
	}

	.alonepro-floating-highlights__badge--tl {
		left: -10px;
		top: 4%;
	}

	.alonepro-floating-highlights__badge--br {
		right: -10px;
		bottom: 4%;
	}

	.alonepro-floating-highlights__icon {
		width: 34px;
		height: 34px;
	}

	.alonepro-floating-highlights__icon svg {
		width: 17px;
		height: 17px;
	}
}

@media (max-width: 480px) {
	.alonepro-floating-highlights__badge {
		padding: 6px 10px;
		gap: 6px;
		border-radius: 12px;
	}

	.alonepro-floating-highlights__icon {
		width: 28px;
		height: 28px;
	}

	.alonepro-floating-highlights__icon svg {
		width: 14px;
		height: 14px;
	}
}

/* Reduced motion override */
@media (prefers-reduced-motion: reduce) {
	.alonepro-floating-highlights__badge {
		transition: none;
	}
}
/* Organic photo mask and extra color blobs. Default cards do not use these classes. */
.alonepro-floating-highlights--mask-organic .alonepro-floating-highlights__image-wrap {
	border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
}

.alonepro-floating-highlights--color-blobs .alonepro-floating-highlights__image-wrap {
	position: relative;
	z-index: 1;
}

.alonepro-floating-highlights--color-blobs .alonepro-floating-highlights__blob {
	display: none;
}

.alonepro-floating-highlights__color-blob {
	position: absolute;
	z-index: 0;
	pointer-events: none;
}

.alonepro-floating-highlights--color-blobs,
.alonepro-floating-highlights--color-blobs .alonepro-floating-highlights__media,
.alonepro-floating-highlights--mask-organic .alonepro-floating-highlights__media {
	overflow: visible;
}

/* Room for the front blob's bottom: -10% bleed, so the parent section
   does not clip it and it stays above the next band. */
.alonepro-floating-highlights--color-blobs {
	padding-bottom: calc(56px + 12px);
}

html:has(.alonepro-floating-highlights--color-blobs) {
	overflow-x: clip;
}

.alonepro-floating-highlights--mask-organic .alonepro-floating-highlights__media,
.alonepro-floating-highlights--color-blobs .alonepro-floating-highlights__media {
	aspect-ratio: auto !important;
	width: 100%;
	max-width: 539px;
	height: 560px;
}

.alonepro-floating-highlights--mask-organic .alonepro-floating-highlights__image-wrap,
.alonepro-floating-highlights--color-blobs .alonepro-floating-highlights__image-wrap {
	position: absolute;
	inset: 40px 20px 60px 40px;
	width: auto;
	height: auto;
}

.alonepro-floating-highlights__color-blob--back {
	top: -6%;
	right: -26%;
	width: 118%;
	aspect-ratio: 1;
	border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
}

.alonepro-floating-highlights__color-blob--front {
	bottom: -10%;
	left: -14%;
	width: 70%;
	aspect-ratio: 4 / 3;
	border-radius: 58% 42% 46% 54% / 48% 62% 38% 52%;
}

.alonepro-floating-highlights__badge--bl {
	bottom: 8%;
	left: 0;
}

.alonepro-floating-highlights__badge--tr {
	top: 8%;
	right: 0;
}

.alonepro-floating-highlights__badge--progress.alonepro-floating-highlights__badge--bl {
	bottom: 30px;
	left: -18px;
	width: 240px;
	max-width: 240px;
}

.alonepro-floating-highlights__badge--tag.alonepro-floating-highlights__badge--tr {
	top: 30px;
	right: 0;
	width: max-content;
	max-width: none;
}

.alonepro-floating-highlights__badge--progress {
	display: block;
	min-width: 0;
	max-width: min(240px, 100%);
	white-space: normal;
	padding: 18px 20px;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--progress span.alonepro-floating-highlights__progress-label {
	display: block;
	margin-bottom: 0;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1;
	text-transform: uppercase;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--progress .alonepro-floating-highlights__progress > b,
.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--progress .alonepro-floating-highlights__progress > b:not([class*="-font-size"]) {
	display: block;
	margin: 8px 0 10px;
	font-size: 2.375rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1;
}

.alonepro-floating-highlights__bar {
	height: 6px;
	overflow: hidden;
	border-radius: 6px;
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, var(--wp--preset--color--base));
}

.alonepro-floating-highlights__bar > span {
	display: block;
	height: 100%;
	border-radius: 6px;
	background: var(--wp--preset--color--secondary);
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--progress .alonepro-floating-highlights__progress-meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 8px;
	color: var(--wp--preset--color--paragraph);
	font-family: var(--wp--preset--font-family--jost, inherit);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: none;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--progress .alonepro-floating-highlights__progress-meta span {
	display: inline;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-transform: none;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--tag {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: max-content;
	max-width: none;
	padding: 12px 18px;
	white-space: nowrap;
}

.alonepro-floating-highlights__icon--tag {
	width: 26px;
	height: 26px;
	border-radius: 0;
	background: transparent !important;
}

.alonepro-floating-highlights__icon--tag svg {
	width: 26px;
	height: 26px;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--tag .alonepro-floating-highlights__tag-label {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	min-width: max-content;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
}

.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--tag .alonepro-floating-highlights__tag-label b,
.alonepro-floating-highlights__badge.alonepro-floating-highlights__badge--tag .alonepro-floating-highlights__tag-label span {
	display: block;
	width: max-content;
	max-width: none;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: keep-all;
}

@media (max-width: 767.98px) {
	body:has(.nextora-header-sticky-cta) .alonepro-floating-highlights__badge--progress.alonepro-floating-highlights__badge--bl {
		bottom: calc(30px + 48px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 375px) {
	.alonepro-floating-highlights__badge--progress.alonepro-floating-highlights__badge--bl {
		left: 0;
		width: 210px;
		max-width: 210px;
	}
}
