/* Recruit-A-Friend sidebox — stone/gold palette + soft sparkle */

.rafsb-shell {
	--rafsb-text: #d7d0c4;
	--rafsb-muted: #8a8378;
	--rafsb-accent: #b3a26e;
	--rafsb-accent-soft: #d5c698;
	--rafsb-radius: 8px;
	--rafsb-border: rgba(115, 109, 98, 0.35);
	--rafsb-border-strong: rgba(179, 162, 110, 0.55);
	--rafsb-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.21), 0 1px 1px 0 rgba(0, 0, 0, 0.25);
	--rafsb-card: linear-gradient(165deg, rgba(51, 49, 45, 0.92) 0%, rgba(25, 23, 20, 0.96) 100%);
	font-family: var(--font-family-primary, Calibri, system-ui, sans-serif);
	color: var(--rafsb-text);
	width: 100%;
	box-sizing: border-box;
}

.box.type-recruitafriend > .box-body,
.sidebox.sidebox-recruitafriend > .sidebox-body,
.sidebox[class*="recruitafriend"] > .sidebox-body {
	padding: 0.45rem 0.5rem 0.55rem !important;
}

.box.type-recruitafriend > .box-head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	height: auto;
	min-height: var(--box-head-height, 48px);
	padding: 0.7rem 1rem;
	line-height: 1.2;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #d5c698;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
	background: linear-gradient(180deg, rgba(17, 17, 23, 0.55) 0%, rgba(17, 17, 23, 0.15) 100%);
	border-bottom: 1px solid rgba(179, 162, 110, 0.18);
}

.box.type-recruitafriend > .box-head::before,
.box.type-recruitafriend > .box-head::after {
	content: "";
	flex: 1 1 0;
	max-width: 2.5rem;
	height: 1px;
}

.box.type-recruitafriend > .box-head::before {
	background: linear-gradient(90deg, transparent, rgba(179, 162, 110, 0.55));
}

.box.type-recruitafriend > .box-head::after {
	background: linear-gradient(90deg, rgba(179, 162, 110, 0.55), transparent);
}

.rafsb-card {
	position: relative;
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
	padding: 1.05rem 1.1rem 1rem;
	border-radius: var(--rafsb-radius);
	background: var(--rafsb-card);
	border: 1px solid var(--rafsb-border-strong);
	box-shadow:
		var(--rafsb-shadow),
		0 0 0 1px rgba(179, 162, 110, 0.08),
		0 0 18px rgba(179, 162, 110, 0.12);
	animation: rafsb-border-pulse 3.2s ease-in-out infinite;
}

@keyframes rafsb-border-pulse {
	0%, 100% {
		box-shadow:
			var(--rafsb-shadow),
			0 0 0 1px rgba(179, 162, 110, 0.08),
			0 0 14px rgba(179, 162, 110, 0.1);
		border-color: rgba(179, 162, 110, 0.45);
	}
	50% {
		box-shadow:
			var(--rafsb-shadow),
			0 0 0 1px rgba(213, 198, 152, 0.18),
			0 0 26px rgba(179, 162, 110, 0.28);
		border-color: rgba(213, 198, 152, 0.7);
	}
}

.rafsb-card__shine {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		115deg,
		transparent 0%,
		transparent 38%,
		rgba(255, 248, 220, 0.14) 48%,
		rgba(213, 198, 152, 0.22) 50%,
		rgba(255, 248, 220, 0.12) 52%,
		transparent 62%,
		transparent 100%
	);
	transform: translateX(-120%);
	animation: rafsb-shine 4.5s ease-in-out infinite;
	z-index: 1;
}

@keyframes rafsb-shine {
	0%, 18% { transform: translateX(-120%); }
	42% { transform: translateX(120%); }
	100% { transform: translateX(120%); }
}

.rafsb-card__sparkles {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

.rafsb-card__sparkles span {
	position: absolute;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #f0e2b8;
	box-shadow: 0 0 6px 1px rgba(213, 198, 152, 0.85);
	opacity: 0;
	animation: rafsb-twinkle 2.8s ease-in-out infinite;
}

.rafsb-card__sparkles span:nth-child(1) { top: 14%; left: 12%; animation-delay: 0s; }
.rafsb-card__sparkles span:nth-child(2) { top: 22%; right: 16%; animation-delay: 0.45s; }
.rafsb-card__sparkles span:nth-child(3) { top: 58%; left: 18%; animation-delay: 0.9s; }
.rafsb-card__sparkles span:nth-child(4) { bottom: 18%; right: 22%; animation-delay: 1.3s; }
.rafsb-card__sparkles span:nth-child(5) { top: 40%; left: 48%; animation-delay: 1.7s; }
.rafsb-card__sparkles span:nth-child(6) { bottom: 28%; left: 72%; animation-delay: 2.1s; }

@keyframes rafsb-twinkle {
	0%, 100% { opacity: 0; transform: scale(0.4); }
	35% { opacity: 1; transform: scale(1); }
	55% { opacity: 0.35; transform: scale(0.8); }
	70% { opacity: 0.9; transform: scale(1.05); }
}

.rafsb-card__top,
.rafsb-card__hint,
.rafsb-card__actions {
	position: relative;
	z-index: 2;
}

.rafsb-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.rafsb-card__identity {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	min-width: 0;
}

.rafsb-card__crest {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, #d5c698, #b3a26e);
	color: #1f1d18;
	box-shadow: 0 0 12px rgba(179, 162, 110, 0.35);
	flex-shrink: 0;
	animation: rafsb-crest-glow 2.6s ease-in-out infinite;
}

@keyframes rafsb-crest-glow {
	0%, 100% { box-shadow: 0 0 10px rgba(179, 162, 110, 0.28); }
	50% { box-shadow: 0 0 18px rgba(213, 198, 152, 0.55); }
}

.rafsb-card__crest i {
	font-size: 0.9rem;
}

.rafsb-card__kicker {
	display: block;
	font-size: 0.66rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rafsb-muted);
	margin-bottom: 0.15rem;
}

.rafsb-card__name {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.2;
	color: #e8e2d6;
}

.rafsb-card__hint {
	margin: 0.85rem 0 0;
	font-size: 0.84rem;
	line-height: 1.4;
	color: var(--rafsb-muted);
}

.rafsb-card__actions {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(115, 109, 98, 0.25);
}

.rafsb-chip {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0.85rem;
	border-radius: 8px;
	border: 1px solid rgba(179, 162, 110, 0.35);
	background: #111117;
	color: #d5c698 !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 0.88rem;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 12px rgba(179, 162, 110, 0.12);
}

.rafsb-chip:hover,
.rafsb-chip:focus {
	border-color: rgba(213, 198, 152, 0.65);
	background: #16161e;
	transform: translateY(-1px);
	color: #f0e6c8 !important;
	text-decoration: none !important;
}

.rafsb-chip__icon {
	display: inline-flex;
	width: 1.35rem;
	justify-content: center;
	color: inherit;
}

.rafsb-chip__arrow {
	margin-left: auto;
	opacity: 0.7;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.rafsb-chip:hover .rafsb-chip__arrow {
	transform: translateX(3px);
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.rafsb-card,
	.rafsb-card__shine,
	.rafsb-card__sparkles span,
	.rafsb-card__crest {
		animation: none !important;
	}

	.rafsb-card__shine {
		display: none;
	}
}
