/* VELYON Theme — Welcome Banner block
 * Personalized "Welcome back {name}" dashboard banner (replaces the old
 * Elementor-built top section on learner-facing pages). Dark/light aware
 * via the usual --velyon-* tokens; the only "always dark-looking" element
 * is the ambient glow layer, which is intentionally subtle enough to read
 * fine on the light surface too (see the light-mode override at the
 * bottom of this file).
 *
 * Animation is opt-out per block instance (the "Animated glow" toggle
 * adds/removes the `.is-static` class) and, sitewide, prefers-reduced-
 * motion already forces every animation-duration to ~0 in tokens.css —
 * no extra per-rule handling needed here.
 */

.velyon-welcome-banner .welcome-banner-inner {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--velyon-radius-l);
	border: 1px solid rgba(0, 206, 45, .35);
	background: radial-gradient(circle at 50% -10%, var(--velyon-surface-alt) 0%, var(--velyon-surface) 55%);
	box-shadow: 0 0 0 1px rgba(0, 206, 45, .06), 0 0 60px rgba(0, 206, 45, .12), var(--velyon-shadow);
	padding: 64px 40px;
	text-align: center;
}

/* Ambient radial glow layer, sits behind the content. */
.welcome-banner-glow {
	position: absolute;
	inset: -20%;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(circle at 50% 25%, var(--velyon-accent) 0%, transparent 55%);
	opacity: .16;
}
.velyon-welcome-banner:not(.is-static) .welcome-banner-glow {
	animation: velyon-wb-breathe 5s ease-in-out infinite;
}
@keyframes velyon-wb-breathe {
	0%, 100% { opacity: .12; transform: scale(1); }
	50% { opacity: .22; transform: scale(1.08); }
}

/* Animated conic-gradient "sweep" traveling around the border — a
   progressive enhancement layered on top of the static border above, so
   browsers without mask-composite support just keep the plain border. */
.velyon-welcome-banner:not(.is-static) .welcome-banner-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	padding: 1.5px;
	background: conic-gradient(from var(--velyon-wb-angle), transparent 0deg, var(--velyon-accent) 60deg, transparent 140deg);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: velyon-wb-sweep 6s linear infinite;
	pointer-events: none;
}
/* v1.2.0 bug fix: this used to rotate the ring ELEMENT itself
   (transform: rotate), which on a wide rectangle tilts the whole border
   and clips it at the corners. Animating the gradient's start angle via
   a registered custom property moves only the highlight around a fixed
   border. Browsers without @property support just show the static arc. */
@property --velyon-wb-angle {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}
@keyframes velyon-wb-sweep {
	to { --velyon-wb-angle: 360deg; }
}

.welcome-banner-content {
	position: relative;
	z-index: 1;
	max-width: 720px;
	margin: 0 auto;
	animation: velyon-wb-fade-up .7s ease both;
}
@keyframes velyon-wb-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

.welcome-banner-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(0, 206, 45, .12);
	border: 1px solid rgba(0, 206, 45, .4);
	color: var(--velyon-accent-deep);
	padding: 8px 18px;
	border-radius: 999px;
	font-family: var(--velyon-font-heading);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: 24px;
	box-shadow: 0 0 18px rgba(0, 206, 45, .15);
}
.velyon-welcome-banner:not(.is-static) .welcome-banner-badge {
	animation: velyon-wb-badge-glow 2.6s ease-in-out infinite alternate;
}
@keyframes velyon-wb-badge-glow {
	from { box-shadow: 0 0 14px rgba(0, 206, 45, .12); }
	to { box-shadow: 0 0 26px rgba(0, 206, 45, .28); }
}
.welcome-banner-badge-icon {
	font-size: 14px;
	line-height: 1;
}

.welcome-banner-heading {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 0 .32em;
	font-family: var(--velyon-font-heading);
	font-weight: 800;
	font-size: clamp(28px, 5vw, 48px);
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 18px;
}
.welcome-banner-heading .wb-white {
	color: var(--velyon-text);
}
.welcome-banner-heading .wb-accent {
	color: var(--velyon-accent);
	text-shadow: 0 0 26px rgba(0, 206, 45, .35);
}

.welcome-banner-description {
	color: var(--velyon-text-muted);
	font-size: clamp(14.5px, 1.6vw, 16.5px);
	line-height: 1.65;
	max-width: 620px;
	margin: 0 auto;
}

.welcome-banner-divider {
	width: 120px;
	height: 4px;
	margin: 26px auto 0;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--velyon-accent), transparent);
	box-shadow: 0 0 16px rgba(0, 206, 45, .4);
}

.welcome-banner-btn {
	margin-top: 28px;
}

/* Light mode: the surface is bright, so the glow/shadow need to pull back
   or the block reads as muddy instead of crisp. Border/badge/heading
   colors already adapt automatically via the tokens they reference. */
html[data-theme="light"] .velyon-welcome-banner .welcome-banner-inner {
	box-shadow: 0 0 0 1px rgba(0, 206, 45, .08), 0 0 40px rgba(0, 206, 45, .08), var(--velyon-shadow);
}
html[data-theme="light"] .welcome-banner-glow {
	opacity: .08;
}
html[data-theme="light"] .velyon-welcome-banner:not(.is-static) .welcome-banner-glow {
	animation-name: velyon-wb-breathe-light;
}
@keyframes velyon-wb-breathe-light {
	0%, 100% { opacity: .06; transform: scale(1); }
	50% { opacity: .12; transform: scale(1.08); }
}
html[data-theme="light"] .welcome-banner-heading .wb-accent {
	text-shadow: none;
}

@media (max-width: 600px) {
	.velyon-welcome-banner .welcome-banner-inner {
		padding: 40px 22px;
	}
	.welcome-banner-badge {
		font-size: 11.5px;
		padding: 7px 14px;
	}
}

/* v2.9.5 — light mode: accent word in the greeting was 2:1 on the light banner. */
html[data-theme="light"] .welcome-banner-heading .wb-accent { color: var(--velyon-accent-deep); }
