/**
 * HFDN Leaderboard wireframe styles
 * Scoped to .hfdn-leaderboard-layout and .hfdn-leaderboard-wireframe
 */

/* ========== Three-column layout ========== */
.hfdn-leaderboard-layout {
	display: grid;
	grid-template-columns: minmax(180px, 220px) 1fr minmax(200px, 280px);
	gap: 2rem;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1.5rem;
}

@media (max-width: 1024px) {
	.hfdn-leaderboard-layout {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
}

/* ========== Left nav ========== */
.hfdn-leaderboard-nav {
	border-right: 1px solid #e5e5e5;
	padding-right: 1rem;
}

.hfdn-leaderboard-nav-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 1rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hfdn-leaderboard-nav-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C20.08 12.63 22 10.55 22 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
}

.hfdn-leaderboard-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfdn-leaderboard-nav-item {
	margin: 0;
}

.hfdn-leaderboard-nav-link {
	display: block;
	padding: 0.5rem 0.75rem;
	color: #333;
	text-decoration: none;
	border-left: 3px solid transparent;
	margin-left: -3px;
	border-radius: 0 4px 4px 0;
}

.hfdn-leaderboard-nav-link:hover {
	background: #f5f5f5;
	color: #000;
}

.hfdn-leaderboard-nav-link.is-current {
	border-left-color: #e91e8c;
	background: rgba(233, 30, 140, 0.06);
	color: #000;
	font-weight: 600;
}

/* Hidden on desktop; shown ≤1024px instead of long link list */
.hfdn-leaderboard-nav-select-wrap {
	display: none;
}

/* Nav select: full width on small screens; chevron / border from hfdn-selects.css */
.hfdn-leaderboard-nav-select {
	width: 100%;
	max-width: 100%;
}

/* ========== Main content ========== */
.hfdn-leaderboard-main {
	min-width: 0;
}

.hfdn-leaderboard-label {
	background: #f0f0f0;
	color: #333;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 0.75rem 1rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
}

/* ========== Podium (Olympic-style stepped blocks) ========== */
.hfdn-leaderboard-podium {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0.25rem;
	background: #f0f0f0;
	padding: 0 1rem 0 1rem;
	margin-bottom: 1.5rem;
	border-radius: 8px;
	position: relative;
	min-height: 238px;
}

/* Step block: 2nd left, 1st center, 3rd right; height = rank (1st tallest). +52px so step-top can sit above step-front. */
.hfdn-podium-step {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	flex: 1;
	max-width: 180px;
	min-width: 100px;
	position: relative;
	z-index: 1;
	border-radius: 6px 6px 0 0;
	box-shadow: 0 -2px 0 rgba(0,0,0,0.15), 2px 0 4px rgba(0,0,0,0.1);
}

/* 1st: light gold column */
.hfdn-podium-step.hfdn-podium-1 {
	order: 2;
	height: 218px;
	background: linear-gradient(180deg, #fff8e0 0%, #f5e6b8 30%, #e8d090 100%);
}

/* 2nd: light silver column */
.hfdn-podium-step.hfdn-podium-2 {
	order: 1;
	height: 178px;
	background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 30%, #c8c8c8 100%);
}

/* 3rd: light bronze column */
.hfdn-podium-step.hfdn-podium-3 {
	order: 3;
	height: 148px;
	background: linear-gradient(180deg, #f5e8d8 0%, #e8c9a8 30%, #d4a574 100%);
}

/* Top surface: avatar, name, score – moved up 18px so entire block sits above rank band with minimal gap */
.hfdn-podium-step-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	flex: 1;
	padding: 0.75rem 0.5rem 0.5rem;
	min-height: 0;
	transform: translateY(-50px);
}

/* Large transparent trophy watermark in 1st place column, just above background */
.hfdn-podium-step.hfdn-podium-1 {
	position: relative;
}

.hfdn-podium-trophy-bg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 0;
}

.hfdn-podium-trophy-bg svg {
	width: 88%;
	height: 88%;
	max-width: 160px;
	max-height: 192px;
	object-fit: contain;
	color: rgba(0, 0, 0, 0.08);
}

.hfdn-podium-step-top {
	position: relative;
	z-index: 1;
}

.hfdn-podium-avatar {
	margin-bottom: 0.5rem;
}

.hfdn-podium-avatar img {
	border-radius: 50%;
	border: 3px solid #333;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hfdn-podium-name {
	color: #1a1a1a;
	font-weight: 600;
	font-size: 0.9375rem;
	text-align: center;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.hfdn-podium-score {
	color: #e91e8c;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.125rem;
	-webkit-text-stroke: 3px #fff;
	text-stroke: 3px #fff;
	paint-order: stroke fill;
}

/* Front face: rank number – dark base */
.hfdn-podium-step-front {
	background: #2a2a2a;
	border-radius: 0 0 6px 6px;
	padding: 0.35rem;
	margin-top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	flex-shrink: 0;
}

.hfdn-podium-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: #c41e3a;
	color: #fff;
	font-weight: 700;
	font-size: 1.25rem;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 1st: gold (same as points display) */
.hfdn-podium-step.hfdn-podium-1 .hfdn-podium-rank {
	background: #ffd700;
	color: #1a1a1a;
}

/* 2nd: silver */
.hfdn-podium-step.hfdn-podium-2 .hfdn-podium-rank {
	background: linear-gradient(145deg, #e8e8e8, #a8a8a8);
	color: #333;
}

/* 3rd: bronze */
.hfdn-podium-step.hfdn-podium-3 .hfdn-podium-rank {
	background: linear-gradient(145deg, #cd7f32, #8b6914);
	color: #fff;
}

/* Hide DataTables default search below the table – we keep only the one to the right of Filter By */
.hfdn-leaderboard-wireframe .dataTables_wrapper .dataTables_filter,
.hfdn-leaderboard-wireframe .dataTables_filter,
.hfdn-leaderboard-wireframe .dt-search {
	display: none !important;
}

/* Hide any search input in the wireframe that is not our filter-bar search */
.hfdn-leaderboard-wireframe input[type="search"]:not(.hfdn-leaderboard-search-input) {
	display: none !important;
}

/* ========== Filter bar ========== */
.hfdn-leaderboard-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hfdn-leaderboard-search-input {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9375rem;
	min-width: 180px;
}

.hfdn-leaderboard-search-input:focus {
	border-color: #e91e8c;
	outline: none;
}

@media (max-width: 600px) {
	.hfdn-leaderboard-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.hfdn-leaderboard-search-input {
		min-width: 0;
	}
}

.hfdn-filter-label {
	font-weight: 600;
	color: #333;
	margin: 0;
}

/* Period filter: layout only; chevron / border from hfdn-selects.css */
.hfdn-period-select {
	min-width: 0;
}

/* ========== Table ========== */
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table {
	width: 100% !important;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
	/* Badges column absorbs remaining width; beats GamiPress + DataTables inline widths via !important below */
	table-layout: fixed !important;
}

.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th,
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead td {
	width: auto !important;
}

.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th {
	text-align: left;
	padding: 0.75rem 1rem;
	background: #f5f5f5;
	font-weight: 600;
	border-bottom: 2px solid #e0e0e0;
}

.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #eee;
}

.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody tr:hover {
	background: #fafafa;
}

.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th.column-position,
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td.column-position {
	width: 2.5rem !important;
	min-width: 2.5rem !important;
	max-width: 3rem !important;
}

/* Profile column: compact; !important beats DataTables inline widths */
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th.column-display_name,
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td.column-display_name {
	text-align: left;
	width: 6.5rem !important;
	max-width: 7.5rem !important;
	min-width: 0 !important;
}

/*
 * Points / metrics column(s): any column-* except position, display_name, badges (dynamic slug e.g. fun_points).
 * !important so DataTables cannot shrink Badges by inflating this column.
 */
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th[class*="column-"]:not(.column-position):not(.column-display_name):not(.column-badges),
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td[class*="column-"]:not(.column-position):not(.column-display_name):not(.column-badges) {
	width: 5.5rem !important;
	max-width: 7rem !important;
	min-width: 0 !important;
	white-space: nowrap !important;
	color: #e91e8c;
	-webkit-text-stroke: 3px #fff;
	text-stroke: 3px #fff;
	paint-order: stroke fill;
}

/* Badges: use all horizontal space left after fixed narrow columns */
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th.column-badges,
.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td.column-badges {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	text-align: left !important;
	vertical-align: top !important;
}

.hfdn-leaderboard-profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	align-self: flex-start;
}

.hfdn-leaderboard-profile .avatar {
	display: block;
	margin-bottom: 0.35rem;
	border-radius: 50%;
}

.hfdn-leaderboard-profile-name {
	font-size: 0.875rem;
	line-height: 1.2;
}

.hfdn-leaderboard-profile-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.hfdn-leaderboard-profile-link:hover .hfdn-leaderboard-profile-name {
	text-decoration: underline;
}

.hfdn-leaderboard-profile-link:focus-visible {
	outline: 2px solid #e91e8c;
	outline-offset: 2px;
	border-radius: 4px;
}

.hfdn-podium-profile-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.hfdn-podium-profile-link:focus-visible {
	outline: 2px solid #e91e8c;
	outline-offset: 2px;
	border-radius: 4px;
}

.hfdn-podium-profile-link:hover .hfdn-podium-name {
	text-decoration: underline;
}

.hfdn-leaderboard-badges {
	display: flex;
	align-items: center;
	align-content: flex-start;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 4px;
	max-height: 60px;
	overflow: hidden;
	width: 100% !important;
	min-width: 100%;
	box-sizing: border-box;
}

.hfdn-leaderboard-badge-icon {
	display: inline-block;
	position: relative;
}

.hfdn-leaderboard-badge-icon img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	vertical-align: middle;
}

/* Badge tooltips: easy-tooltips library, HFDN pink + white text */
[id^="hfdn-badge-tip-"] {
	--tooltip-background: #e91e8c;
	--tooltip-border-color: #e91e8c;
	--tooltip-border-size: 0;
	--tooltip-max-width: 220px;
	--tooltip-vertical-distance: 10px;
	color: #fff;
}

[id^="hfdn-badge-tip-"] .tooltip-text {
	padding: 0.5rem 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	border-radius: 8px;
}

/* "+XX more" as simple small text link (not pill) */
.hfdn-badges-more-link {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.8125rem;
	color: #e91e8c;
	cursor: pointer;
	text-decoration: none;
	margin-left: 2px;
}

.hfdn-badges-more-link:hover {
	text-decoration: underline;
}

.hfdn-leaderboard-badges-more {
	font-size: 0.8125rem;
	color: #666;
	margin-left: 2px;
}

/* Badges modal */
.hfdn-badges-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.hfdn-badges-modal-overlay.is-open {
	display: flex;
}

.hfdn-badges-modal {
	background: #fff;
	border-radius: 8px;
	max-width: 90vw;
	max-height: 85vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.hfdn-badges-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}

.hfdn-badges-modal-title {
	margin: 0;
	font-size: 1.125rem;
}

.hfdn-badges-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem;
	color: #666;
}

.hfdn-badges-modal-close:hover {
	color: #000;
}

.hfdn-badges-modal-body {
	padding: 1.25rem;
	overflow-y: auto;
	flex: 1;
}

.hfdn-badges-modal-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.hfdn-badges-modal-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 80px;
}

.hfdn-badges-modal-badge img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	margin-bottom: 0.35rem;
}

.hfdn-badges-modal-badge span {
	font-size: 0.75rem;
	line-height: 1.2;
}

/* Flat table: allow horizontal scroll when all columns stay visible (no GamiPress responsive mode) */
.hfdn-leaderboard-wireframe .dataTables_wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1.5rem;
}

@media (max-width: 760px) {
	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th,
	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td {
		padding: 0.4rem 0.5rem;
		font-size: 0.8125rem;
	}

	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th.column-badges,
	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td.column-badges {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
	}

	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th.column-display_name,
	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td.column-display_name {
		width: 5rem !important;
		max-width: 5.5rem !important;
	}

	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table thead th[class*="column-"]:not(.column-position):not(.column-display_name):not(.column-badges),
	.hfdn-leaderboard-wireframe .gamipress-leaderboard-table tbody td[class*="column-"]:not(.column-position):not(.column-display_name):not(.column-badges) {
		width: 4.5rem !important;
		max-width: 6rem !important;
	}

	.hfdn-leaderboard-profile-name {
		font-size: 0.75rem;
	}

	.hfdn-leaderboard-profile .avatar,
	.hfdn-leaderboard-profile img.avatar {
		width: 40px !important;
		height: 40px !important;
		max-width: 40px;
	}

	.hfdn-leaderboard-badges {
		max-height: none;
		overflow: visible;
	}

	.hfdn-leaderboard-badge-icon img {
		width: 22px;
		height: 22px;
	}
}

/* Hide infinite scroll block */
.hfdn-leaderboard-wireframe .gamipress-leaderboards-infinite-scrolling,
.hfdn-no-infinite-scroll + .gamipress-leaderboards-infinite-scrolling {
	display: none !important;
}

/* ========== Pagination ========== */
.hfdn-leaderboard-pagination {
	margin: 1.5rem 0;
}

.hfdn-leaderboard-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px;
}

.hfdn-leaderboard-pagination .page-numbers li {
	margin: 0;
}

.hfdn-leaderboard-pagination a,
.hfdn-leaderboard-pagination span {
	display: inline-block;
	min-width: 2.25rem;
	padding: 0.5rem 0.75rem;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-weight: 500;
}

.hfdn-leaderboard-pagination a:hover {
	background: #f5f5f5;
	border-color: #e91e8c;
	color: #e91e8c;
}

.hfdn-leaderboard-pagination .current {
	background: #e91e8c;
	border-color: #e91e8c;
	color: #fff;
}

.hfdn-leaderboard-pagination .prev,
.hfdn-leaderboard-pagination .next {
	font-weight: 600;
}

/* ========== Right sidebar – Top Boards ========== */
.hfdn-leaderboard-top-boards {
	border-left: 1px solid #e5e5e5;
	padding-left: 1rem;
}

.hfdn-top-boards-title {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	margin: 0 0 1rem 0;
	color: #333;
}

.hfdn-top-boards-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.hfdn-top-board-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1rem;
}

.hfdn-top-board-card-title {
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	color: #333;
}

.hfdn-top-board-view-all {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #e91e8c;
	text-decoration: none;
	display: inline-block;
	margin-bottom: 0.75rem;
}

.hfdn-top-board-view-all:hover {
	text-decoration: underline;
}

.hfdn-top-board-top3 {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfdn-top-board-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.8125rem;
}

.hfdn-top-board-row:last-child {
	border-bottom: none;
}

.hfdn-top-board-rank {
	font-weight: 700;
	min-width: 1.25rem;
	color: #666;
}

.hfdn-top-board-avatar img {
	border-radius: 50%;
	width: 28px;
	height: 28px;
	object-fit: cover;
}

.hfdn-top-board-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hfdn-top-board-profile-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.hfdn-top-board-profile-link:focus-visible {
	outline: 2px solid #e91e8c;
	outline-offset: 2px;
	border-radius: 4px;
}

.hfdn-top-board-profile-link:hover .hfdn-top-board-name {
	text-decoration: underline;
}

.hfdn-top-board-profile-link .hfdn-top-board-name {
	flex: 1;
	min-width: 0;
}

.hfdn-top-board-points {
	font-weight: 600;
	color: #333;
}

.hfdn-top-boards-empty,
.hfdn-leaderboard-top-boards-placeholder {
	font-size: 0.875rem;
	color: #666;
	margin: 0;
}

@media (max-width: 1024px) {
	.hfdn-leaderboard-nav .hfdn-leaderboard-nav-list {
		display: none;
	}

	.hfdn-leaderboard-nav-select-wrap {
		display: block;
	}

	.hfdn-leaderboard-nav {
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		border-right: none;
		border-bottom: none;
		padding-right: 0;
		padding-bottom: 0.75rem;
	}

	.hfdn-leaderboard-nav .hfdn-leaderboard-nav-title {
		margin: 0;
	}

	.hfdn-leaderboard-nav-select-wrap {
		margin: 0;
		padding: 0;
	}

	.hfdn-leaderboard-top-boards {
		border-left: none;
		border-top: 1px solid #e5e5e5;
		padding-left: 0;
		padding-top: 1.5rem;
	}
}

/* Responsive: podium and modal (+52px for step-top offset) */
@media (max-width: 480px) {
	.hfdn-leaderboard-podium {
		min-height: 178px;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
		gap: 0.15rem;
	}

	.hfdn-podium-step.hfdn-podium-1 { height: 158px; }
	.hfdn-podium-step.hfdn-podium-2 { height: 118px; }
	.hfdn-podium-step.hfdn-podium-3 { height: 88px; }

	.hfdn-podium-step {
		min-width: 70px;
		max-width: 110px;
	}

	.hfdn-podium-avatar img {
		max-width: 48px;
		max-height: 48px;
	}

	.hfdn-podium-name {
		font-size: 0.8125rem;
	}

	.hfdn-podium-score {
		font-size: 0.875rem;
	}

	.hfdn-podium-step-front {
		min-height: 36px;
	}

	.hfdn-podium-rank {
		width: 28px;
		height: 28px;
		font-size: 1rem;
	}
}

/* Modal: full-width on mobile, scrollable */
@media (max-width: 600px) {
	.hfdn-badges-modal-overlay {
		padding: 0.5rem;
		align-items: flex-end;
	}

	.hfdn-badges-modal {
		max-width: 100%;
		max-height: 90vh;
		width: 100%;
	}

	.hfdn-badges-modal-body {
		max-height: 60vh;
	}
}

/* ========== News Feed widget hardening (activity sidebars only) ========== */
#secondary.sidebar-left .widget .gamipress-leaderboard,
#secondary-right.sidebar-right .widget .gamipress-leaderboard {
	max-width: 100%;
	overflow: hidden;
}

#secondary.sidebar-left .widget .gamipress-leaderboard *,
#secondary-right.sidebar-right .widget .gamipress-leaderboard * {
	box-sizing: border-box;
}

#secondary.sidebar-left .widget .gamipress-leaderboard img,
#secondary-right.sidebar-right .widget .gamipress-leaderboard img {
	max-width: 100%;
	height: auto;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .dataTables_wrapper,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .dataTables_wrapper {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .gamipress-leaderboard-table,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .gamipress-leaderboard-table {
	width: 100% !important;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-podium,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-podium {
	min-height: 172px;
	padding: 0 0.5rem;
	margin-bottom: 1rem;
	gap: 0.2rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step {
	min-width: 68px;
	max-width: 110px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-1,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-1 {
	height: 158px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-2,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-2 {
	height: 130px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-3,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step.hfdn-podium-3 {
	height: 106px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step-top,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step-top {
	transform: translateY(-28px);
	padding: 0.5rem 0.35rem 0.35rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-trophy-bg svg,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-trophy-bg svg {
	max-width: 96px;
	max-height: 120px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-avatar img,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-avatar img {
	width: 46px;
	height: 46px;
	max-width: 46px;
	border-width: 2px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-name,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-name {
	font-size: 0.8125rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-score,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-score {
	font-size: 0.875rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step-front,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step-front {
	min-height: 34px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-rank,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-rank {
	width: 26px;
	height: 26px;
	font-size: 0.9375rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-profile .avatar,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-profile .avatar {
	width: 38px !important;
	height: 38px !important;
	max-width: 38px !important;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-profile-name,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-profile-name {
	font-size: 0.75rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-badges,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-badges {
	max-height: 52px;
	overflow: hidden;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-badge-icon img,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-badge-icon img {
	width: 20px;
	height: 20px;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .gamipress-leaderboard-table thead th,
#secondary.sidebar-left .widget .gamipress-leaderboard .gamipress-leaderboard-table tbody td,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .gamipress-leaderboard-table thead th,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .gamipress-leaderboard-table tbody td {
	padding: 0.45rem 0.5rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .gamipress-leaderboard-table .column-position,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .gamipress-leaderboard-table .column-position {
	width: 2rem !important;
	max-width: 2rem !important;
}

@media (max-width: 1200px) {
	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-trophy-bg,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-trophy-bg {
		display: none;
	}
}

@media (max-width: 768px) {
	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-podium,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-podium {
		min-height: 154px;
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step {
		min-width: 58px;
		max-width: 96px;
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-step-top,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-step-top {
		transform: translateY(-22px);
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-podium-avatar img,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-podium-avatar img {
		width: 40px;
		height: 40px;
		max-width: 40px;
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-leaderboard-profile .avatar,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-leaderboard-profile .avatar {
		width: 32px !important;
		height: 32px !important;
		max-width: 32px !important;
	}
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fff;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-item,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-item {
	display: grid;
	grid-template-columns: 1.75rem 1fr auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.6rem;
	border-bottom: 1px solid #f1f1f1;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-item:last-child,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-item:last-child {
	border-bottom: 0;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-rank,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-rank {
	font-weight: 700;
	font-size: 1.1rem;
	color: #333;
	text-align: center;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-profile,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-avatar,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-avatar {
	display: block;
	margin-bottom: 0.2rem;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-avatar .avatar,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-avatar .avatar {
	width: 52px;
	height: 52px;
	max-width: 52px;
	border-radius: 50%;
	display: block;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-name,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-name {
	font-size: 0.85rem;
	line-height: 1.2;
	color: #444;
	word-break: break-word;
	overflow-wrap: anywhere;
	max-width: 100%;
}

#secondary.sidebar-left .widget .gamipress-leaderboard a.hfdn-widget-standings-profile:hover .hfdn-widget-standings-name,
#secondary-right.sidebar-right .widget .gamipress-leaderboard a.hfdn-widget-standings-profile:hover .hfdn-widget-standings-name {
	text-decoration: underline;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-points,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-points {
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1;
	color: #e91e8c;
	-webkit-text-stroke: 3px #fff;
	text-stroke: 3px #fff;
	paint-order: stroke fill;
	text-align: right;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-view-all-wrap,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-view-all-wrap {
	margin-top: 0.6rem;
	text-align: right;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-view-all,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-view-all {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #e91e8c;
	text-decoration: none;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-view-all:hover,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-view-all:hover {
	text-decoration: underline;
}

#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-filter-label,
#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-filter-label {
	margin-bottom: -12px;
}

@media (max-width: 768px) {
	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-item,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-item {
		grid-template-columns: 1.5rem 1fr auto;
		padding: 0.35rem 0.45rem;
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-avatar .avatar,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-avatar .avatar {
		width: 44px;
		height: 44px;
		max-width: 44px;
	}

	#secondary.sidebar-left .widget .gamipress-leaderboard .hfdn-widget-standings-points,
	#secondary-right.sidebar-right .widget .gamipress-leaderboard .hfdn-widget-standings-points {
		font-size: 1.24rem;
	}
}
