/* Styles for new/templ/component/referral_modal.templ (templ ReferralModal).
   Shares the visual language of lives_modal.css (hero + cards + pink accents). */
#referralModal .modal-content {
	border: none;
	border-radius: 30px;
	overflow: hidden;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.6),
		0 50px 100px -20px rgba(50, 20, 90, 0.5),
		0 30px 60px -30px rgba(255, 75, 125, 0.35);
}

/* Staggered entrance for body sections when the modal opens */
#referralModal.show .refer-hero > *:not(.refer-hero__aura):not(.refer-hero__float),
#referralModal.show .refer-link,
#referralModal.show .refer-stats,
#referralModal.show .refer-info {
	animation: referRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
#referralModal.show .refer-hero__badge { animation-delay: 0.05s; }
#referralModal.show .refer-hero__title { animation-delay: 0.1s; }
#referralModal.show .refer-hero__subtitle { animation-delay: 0.15s; }
#referralModal.show .refer-link { animation-delay: 0.2s; }
#referralModal.show .refer-stats { animation-delay: 0.28s; }
#referralModal.show .refer-info { animation-delay: 0.36s; }
@keyframes referRise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.refer-hero {
	position: relative;
	text-align: center;
	padding: 46px 32px 34px;
	background:
		radial-gradient(90% 120% at 15% 0%, rgba(255, 170, 120, 0.22) 0%, rgba(255, 170, 120, 0) 55%),
		radial-gradient(90% 120% at 85% 0%, rgba(190, 120, 255, 0.2) 0%, rgba(190, 120, 255, 0) 55%),
		radial-gradient(120% 90% at 50% -20%, rgba(255, 116, 132, 0.28) 0%, rgba(255, 116, 132, 0) 62%),
		linear-gradient(175deg, #fffcfc 0%, #ffeff3 100%);
	overflow: hidden;
}
/* Soft dot-grid texture, fading out toward the bottom */
.refer-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(214, 19, 107, 0.4) 1px, transparent 1.5px);
	background-size: 22px 22px;
	opacity: 0.07;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
	mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
	pointer-events: none;
}
.refer-hero__aura {
	position: absolute;
	top: -170px;
	left: 50%;
	transform: translateX(-50%);
	width: 540px;
	height: 400px;
	background: radial-gradient(circle, rgba(255, 75, 125, 0.22) 0%, rgba(255, 75, 125, 0) 68%);
	pointer-events: none;
	animation: referAuraPulse 5s ease-in-out infinite;
}
@keyframes referAuraPulse {
	0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
	50% { opacity: 0.75; transform: translateX(-50%) scale(1.08); }
}
.refer-hero__float {
	position: absolute;
	width: 34px;
	opacity: 0.28;
	pointer-events: none;
	animation: referFloat 6s ease-in-out infinite;
}
.refer-hero__float--1 { top: 34px; left: 9%; width: 30px; transform: rotate(-14deg); }
.refer-hero__float--2 { top: 76px; right: 10%; width: 44px; transform: rotate(12deg); animation-delay: -2s; }
.refer-hero__float--3 { bottom: 30px; left: 16%; width: 22px; transform: rotate(8deg); animation-delay: -4s; opacity: 0.18; filter: blur(1px); }
@keyframes referFloat {
	0%, 100% { translate: 0 0; rotate: 0deg; }
	50% { translate: 0 -14px; rotate: 6deg; }
}
/* Twinkling sparkles */
.refer-hero__icon::before,
.refer-hero__icon::after {
	content: "\2726";
	position: absolute;
	color: #ff4b7d;
	text-shadow: 0 0 12px rgba(255, 75, 125, 0.65);
	animation: referTwinkle 2.6s ease-in-out infinite;
	pointer-events: none;
}
.refer-hero__icon::before {
	top: -6px;
	left: calc(50% - 96px);
	font-size: 15px;
}
.refer-hero__icon::after {
	bottom: 4px;
	right: calc(50% - 102px);
	font-size: 11px;
	color: #c07bff;
	text-shadow: 0 0 12px rgba(190, 120, 255, 0.65);
	animation-delay: -1.3s;
}
@keyframes referTwinkle {
	0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
	50% { opacity: 0.95; transform: scale(1.15) rotate(40deg); }
}
.refer-hero__close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 4px 14px -4px rgba(30, 20, 60, 0.18);
	backdrop-filter: blur(6px);
	color: #9a93ab;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
	z-index: 3;
}
.refer-hero__close:hover {
	background: #fff;
	color: #f75a5b;
	transform: rotate(90deg) scale(1.05);
}
.refer-hero__icon {
	position: relative;
	margin: 0 auto 6px;
}
.refer-hero__icon img {
	height: 116px;
	filter: drop-shadow(0 20px 28px rgba(247, 90, 91, 0.35));
	animation: referHeroFloat 3.2s ease-in-out infinite;
}
@keyframes referHeroFloat {
	0%, 100% { transform: translateY(0) rotate(-1.5deg); }
	50% { transform: translateY(-9px) rotate(1.5deg); }
}
.refer-hero__badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 17px;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff6a92 0%, #ff4b7d 45%, #c9086a 100%);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		0 10px 24px -6px rgba(255, 75, 125, 0.65);
	margin-bottom: 14px;
	overflow: hidden;
}
.refer-hero__badge i {
	animation: referHeartbeat 1.6s ease-in-out infinite;
}
@keyframes referHeartbeat {
	0%, 30%, 100% { transform: scale(1); }
	10% { transform: scale(1.25); }
	20% { transform: scale(1.05); }
}
/* Sweeping shine across the badge */
.refer-hero__badge::after {
	content: "";
	position: absolute;
	top: 0;
	left: -70%;
	width: 45%;
	height: 100%;
	background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
	transform: skewX(-20deg);
	animation: referShine 3.4s ease-in-out infinite;
}
@keyframes referShine {
	0%, 55% { left: -70%; }
	85%, 100% { left: 130%; }
}
.refer-hero__title {
	position: relative;
	margin: 0 0 9px;
	font-weight: 800;
	font-size: 28px;
	letter-spacing: -0.6px;
	background: linear-gradient(120deg, #241f3d 30%, #6d2350 70%, #d6136b 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #241f3d;
}
.refer-hero__subtitle {
	position: relative;
	margin: 0 auto;
	max-width: 430px;
	color: #837f96;
	font-size: 15px;
	line-height: 1.55;
}

/* ---------- Body ---------- */
#referralModal .refer-body {
	padding: 26px 28px 30px;
	background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
}
.refer-section-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #9d9fb3;
	margin-bottom: 10px;
}
.refer-section-label i {
	color: #ff4b7d;
}

/* Link pill */
.refer-link__pill {
	display: flex;
	align-items: stretch;
	gap: 8px;
	padding: 7px;
	border-radius: 999px;
	border: 1.5px solid #ece9f4;
	background: #fff;
	box-shadow:
		inset 0 1px 3px rgba(30, 20, 60, 0.04),
		0 10px 30px -18px rgba(30, 20, 60, 0.25);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.refer-link__pill:hover {
	border-color: #f2d4de;
}
.refer-link__pill:focus-within {
	border-color: #ff8fb0;
	box-shadow:
		inset 0 1px 3px rgba(30, 20, 60, 0.04),
		0 0 0 4px rgba(255, 75, 125, 0.14),
		0 10px 30px -18px rgba(255, 75, 125, 0.4);
}
.refer-link__pill input {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	background: transparent;
	outline: none;
	padding: 8px 12px 8px 17px;
	font-size: 14.5px;
	font-weight: 500;
	color: #3f4460;
	text-overflow: ellipsis;
}
.refer-link__copy {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff6a92 0%, #ff4b7d 45%, #d6136b 100%);
	color: #fff;
	font-weight: 700;
	font-size: 14.5px;
	white-space: nowrap;
	overflow: hidden;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.3),
		0 10px 22px -8px rgba(255, 75, 125, 0.7);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.refer-link__copy::after {
	content: "";
	position: absolute;
	top: 0;
	left: -70%;
	width: 45%;
	height: 100%;
	background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
	transform: skewX(-20deg);
	transition: left 0.45s ease;
}
.refer-link__copy:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.3),
		0 15px 30px -8px rgba(255, 75, 125, 0.8);
}
.refer-link__copy:hover::after {
	left: 130%;
}
.refer-link__copy:active {
	transform: translateY(0) scale(0.96);
}
.refer-link__hint {
	margin: 11px 6px 0;
	color: #8b90a3;
	font-size: 13.5px;
	line-height: 1.5;
}

/* ---------- Stats ---------- */
.refer-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 24px 0;
}
.refer-stat {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px 12px 17px;
	border-radius: 22px;
	border: 1.5px solid transparent;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.refer-stat--links {
	background: linear-gradient(160deg, #f0fcf5 0%, #e2f8ec 100%);
	border-color: #d9f2e4;
}
.refer-stat--hearts {
	background: linear-gradient(160deg, #fff2f4 0%, #ffe4e9 100%);
	border-color: #ffd9e0;
}
.refer-stat--clicks {
	background: linear-gradient(160deg, #f5f6fa 0%, #eceef5 100%);
	border-color: #e4e7f0;
}
.refer-stat:hover {
	transform: translateY(-4px);
}
.refer-stat--links:hover { box-shadow: 0 22px 40px -22px rgba(31, 160, 92, 0.45); }
.refer-stat--hearts:hover { box-shadow: 0 22px 40px -22px rgba(247, 90, 91, 0.5); }
.refer-stat--clicks:hover { box-shadow: 0 22px 40px -22px rgba(108, 115, 135, 0.45); }
.refer-stat__icon {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 17px;
	font-size: 22px;
	margin-bottom: 11px;
	background: #fff;
	box-shadow: 0 8px 18px -8px rgba(30, 20, 60, 0.22);
	transition: transform 0.2s ease;
}
.refer-stat:hover .refer-stat__icon {
	transform: scale(1.1) rotate(-4deg);
}
.refer-stat--links .refer-stat__icon { color: #1fa05c; }
.refer-stat--hearts .refer-stat__icon { color: #f75a5b; }
.refer-stat--clicks .refer-stat__icon { color: #6c7387; }
.refer-stat__value {
	font-size: 28px;
	font-weight: 800;
	color: #23273f;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.5px;
}
.refer-stat--links .refer-stat__value { color: #157547; }
.refer-stat--hearts .refer-stat__value { color: #d13c4a; }
.refer-stat--clicks .refer-stat__value { color: #4d5468; }
.refer-stat__label {
	margin-top: 3px;
	font-size: 12.5px;
	font-weight: 700;
	color: #8b90a3;
	letter-spacing: 0.1px;
}
.refer-stat--links .refer-stat__label { color: #4d9b74; }
.refer-stat--hearts .refer-stat__label { color: #cf7a86; }

/* ---------- Info cards ---------- */
.refer-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.refer-info__card {
	position: relative;
	display: flex;
	gap: 16px;
	padding: 18px 20px 18px 24px;
	border-radius: 20px;
	background: #f9f8fc;
	border: 1.5px solid #f0eef6;
	overflow: hidden;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
/* Accent bar on the left edge */
.refer-info__card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 4px;
	border-radius: 0 4px 4px 0;
}
.refer-info__card:first-child::before {
	background: linear-gradient(180deg, #34c778 0%, #1fa05c 100%);
}
.refer-info__card:last-child::before {
	background: linear-gradient(180deg, #3fabf2 0%, #0d8ee0 100%);
}
.refer-info__card:hover {
	background: #fff;
	border-color: #e8e5f1;
	box-shadow: 0 16px 34px -24px rgba(30, 20, 60, 0.35);
}
.refer-info__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	font-size: 17px;
	box-shadow: 0 6px 14px -6px rgba(30, 20, 60, 0.18);
}
.refer-info__icon--how {
	color: #fff;
	background: linear-gradient(140deg, #34c778 0%, #1fa05c 100%);
}
.refer-info__icon--invalid {
	color: #fff;
	background: linear-gradient(140deg, #3fabf2 0%, #0d8ee0 100%);
}
.refer-info__card h6 {
	margin: 2px 0 5px;
	font-weight: 800;
	font-size: 15px;
	color: #23273f;
	letter-spacing: -0.2px;
}
.refer-info__card p {
	margin: 0;
	color: #85899c;
	font-size: 13.5px;
	line-height: 1.6;
}

@media (max-width: 575px) {
	.refer-hero { padding: 40px 20px 26px; }
	.refer-hero__icon img { height: 92px; }
	.refer-hero__icon::before { left: calc(50% - 78px); }
	.refer-hero__icon::after { right: calc(50% - 84px); }
	.refer-hero__title { font-size: 22px; }
	#referralModal .refer-body { padding: 20px 16px 24px; }
	.refer-link__copy span { display: none; }
	.refer-link__copy { padding: 10px 16px; }
	.refer-stats { gap: 10px; margin: 18px 0; }
	.refer-stat { padding: 15px 8px 13px; border-radius: 18px; }
	.refer-stat__icon { width: 44px; height: 44px; font-size: 19px; border-radius: 13px; }
	.refer-stat__value { font-size: 22px; }
	.refer-stat__label { font-size: 11.5px; }
	.refer-info__card { padding: 15px 16px 15px 20px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	#referralModal * {
		animation: none !important;
	}
}
