/* v0.0.69 — Richest players grid & sidebox styles (SCSS) */

// ---------- Public list page ----------
.hytaleRichestPlayers__searchContainer {
	display: inline-flex;
	align-items: center;
	position: relative;
}

.hytaleRichestPlayers__searchWrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 30px;
	padding: 2px 10px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	width: 36px;
	height: 36px;
	overflow: hidden;
	cursor: pointer;

	&.active, &:focus-within {
		width: 240px;
		background: rgba(255, 255, 255, 0.12);
		border-color: rgba(255, 255, 255, 0.25);
		padding: 2px 12px;
	}

	.hytaleRichestPlayers__searchInput {
		background: transparent !important;
		border: none !important;
		box-shadow: none !important;
		padding: 4px 0 4px 26px !important;
		color: var(--wcfTextColor);
		width: 100%;
		font-size: 0.95rem;
		outline: none;
		height: auto !important;
		
		&::placeholder {
			color: rgba(255, 255, 255, 0.4);
		}
	}

	.hytaleRichestPlayers__searchIcon {
		position: absolute;
		left: 10px;
		pointer-events: none;
		color: rgba(255, 255, 255, 0.6);
		display: flex;
		align-items: center;
		justify-content: center;
		
		svg {
			width: 16px;
			height: 16px;
			fill: currentColor;
		}
	}
}

.hytaleRichestPlayers__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
	@include screen-sm-down {
		grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
		gap: 10px;
	}
}

.hytaleRichestPlayers__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 20px 8px 12px;
	background: rgba(255, 255, 255, .03);
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 8px;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;

	&:hover {
		transform: translateY(-2px);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	}
}

.hytaleRichestPlayers__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hytaleRichestPlayers__badge--rank-1 {
	background: #d4af37;
	color: #000;
}
.hytaleRichestPlayers__badge--rank-2 {
	background: #c0c0c0;
	color: #000;
}
.hytaleRichestPlayers__badge--rank-3 {
	background: #cd7f32;
	color: #fff;
}

.hytaleRichestPlayers__avatarWrap {
	position: relative;
	width: 44px;
	height: 44px;
	margin-bottom: 4px;
}

.hytaleRichestPlayers__avatar {
	width: 44px;
	height: 44px;
	border-radius: 6px;
	image-rendering: pixelated;
	display: block;
	background: transparent;
}

.hytaleRichestPlayers__avatar--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #3a4a5e, #5a6a7e);
	color: #fff;
	font-weight: 700;
	font-size: 1.2em;
}

.hytaleRichestPlayers__crownIcon {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translate3d(-50%, 0, 0);
	width: 22px;
	height: 22px;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
	pointer-events: none;
}

.hytaleRichestPlayers__name {
	font-size: .95em;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	a {
		text-decoration: none;
		color: inherit;
		&:hover {
			text-decoration: underline;
		}
	}
}

.hytaleRichestPlayers__balance {
	font-size: .8em;
	opacity: .8;
	color: var(--wcfContentDimmedText);
}

.hytaleRichestPlayers__item--rank-1 {
	border-color: rgba(212, 175, 55, 0.45);
	background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);

	.hytaleRichestPlayers__name {
		color: #d4af37;
		font-weight: 700;
	}
}

.hytaleRichestPlayers__item--rank-2 {
	border-color: rgba(192, 192, 192, 0.35);
	background: linear-gradient(135deg, rgba(192, 192, 192, 0.06), rgba(192, 192, 192, 0.01));
	box-shadow: 0 4px 12px rgba(192, 192, 192, 0.07);

	.hytaleRichestPlayers__name {
		color: #e0e0e0;
	}
}

.hytaleRichestPlayers__item--rank-3 {
	border-color: rgba(205, 127, 50, 0.35);
	background: linear-gradient(135deg, rgba(205, 127, 50, 0.04), rgba(205, 127, 50, 0.01));
	box-shadow: 0 4px 12px rgba(205, 127, 50, 0.05);

	.hytaleRichestPlayers__name {
		color: #cd7f32;
	}
}

.hytaleRichestPlayers__pagination {
	margin: 24px 0 16px;
}

.hytaleRichestPlayers__container {
	margin-top: 16px;
}

// ---------- Sidebox variant ----------
.hytaleRichestPlayers__grid--sidebox {
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 8px;
	
	.hytaleRichestPlayers__item {
		padding: 16px 4px 6px;
		gap: 3px;
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;

		&:hover {
			transform: none;
			box-shadow: none;
		}
	}
	
	.hytaleRichestPlayers__avatar,
	.hytaleRichestPlayers__avatar--placeholder {
		width: 32px;
		height: 32px;
	}
	
	.hytaleRichestPlayers__avatarWrap {
		width: 32px;
		height: 32px;
		margin-bottom: 2px;
	}

	.hytaleRichestPlayers__crownIcon--sidebox {
		top: -9px;
		width: 18px;
		height: 18px;
	}

	.hytaleRichestPlayers__badge--sidebox {
		top: 2px;
		left: 2px;
		font-size: 0.65rem;
		padding: 1px 4px;
	}

	.hytaleRichestPlayers__name,
	.hytaleRichestPlayers__name a {
		color: inherit;
		font-size: inherit;
		font-weight: inherit;
		text-decoration: none;
		&:hover {
			text-decoration: underline;
		}
	}
}

.hytaleRichestPlayers__name--sidebox {
	font-size: .8em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.hytaleRichestPlayers__balance--sidebox {
	font-size: .75em;
	opacity: 0.8;
	color: var(--wcfContentDimmedText);
}

.hytaleRichestPlayers__more {
	margin: 8px 0 0;
	text-align: right;
	font-size: .85em;
}
