/**
 * Beanstalk leaderboard view styles.
 *
 * Three time-of-day skins, matching the mountain view's timeBucket():
 * day (05:00-15:59), dusk (16:00-19:59), night (20:00-04:59).
 */

/* Night (default): deep sky, bright moon, full starfield. */
.beanstalk-lb {
	--bsl-sky-1: #070c26;
	--bsl-sky-2: #121a44;
	--bsl-sky-3: #222d59;
	--bsl-sky-4: #38477c;
	--bsl-star-op: 1;
	--bsl-moon-glow: #fff8d8;
	--bsl-soil: #2f2416;
	--bsl-grass: #4a7c33;
	--bsl-vine-1: #2f6b2a;
	--bsl-vine-2: #4b9c3c;
	--bsl-vine-3: #6fc24d;
	--bsl-label: #ffffff;
	--bsl-sublabel: #c9d2f0;
	--bsl-chip-ring: #0b1030;

	max-width: 680px;
	margin: 0 auto;
}

/* Dusk: purple to amber sky, sun low on the horizon, first stars out. */
.beanstalk-lb--dawn {
	--bsl-sky-1: #241f4d;
	--bsl-sky-2: #5c3a71;
	--bsl-sky-3: #c4653f;
	--bsl-sky-4: #ffb066;
	--bsl-star-op: 0.35;
	--bsl-soil: #3a2a19;
	--bsl-grass: #57893a;
	--bsl-vine-1: #33642c;
	--bsl-vine-2: #54a03f;
	--bsl-vine-3: #7dc157;
	--bsl-label: #ffffff;
	--bsl-sublabel: #ffdcb8;
	--bsl-chip-ring: #241f4d;
}

/* Day: bright blue sky, strong sun, no stars, dark labels for contrast. */
.beanstalk-lb--day {
	--bsl-sky-1: #3f9bdc;
	--bsl-sky-2: #74c2ea;
	--bsl-sky-3: #a9dcf3;
	--bsl-sky-4: #e8f6fc;
	--bsl-star-op: 0;
	--bsl-soil: #4a3a22;
	--bsl-grass: #62a83f;
	--bsl-vine-1: #3f7d33;
	--bsl-vine-2: #5fb648;
	--bsl-vine-3: #8ada63;
	--bsl-label: #ffffff;
	--bsl-sublabel: #f0f6ff;
	--bsl-chip-ring: #ffffff;
}

.beanstalk-lb .bsl-stars { opacity: var( --bsl-star-op, 1 ); }

.beanstalk-lb__scene {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #1d2340;
}

.beanstalk-lb__list {
	margin-top: 12px;
	max-height: 300px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-auto-flow: column;
	grid-template-rows: repeat( var( --bsl-rows, 5 ), auto );
	gap: 6px 14px;
	padding-right: 4px;
}

.beanstalk-lb__list .bsl-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 9px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid rgba( 0, 0, 0, 0.06 );
	font-size: 13px;
}

.beanstalk-lb__list .bsl-row--lead {
	background: #fff8e6;
	border-color: rgba( 224, 169, 59, 0.55 );
}

.beanstalk-lb__list .bsl-rownum {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	color: #ffffff;
	font-weight: 700;
	font-size: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.beanstalk-lb__list .bsl-rowname {
	flex: 1 1 auto;
	color: #1a1a2e;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.beanstalk-lb__list a.bsl-rowname {
	text-decoration: none;
	cursor: pointer;
}

.beanstalk-lb__list a.bsl-rowname:hover {
	text-decoration: underline;
}

.beanstalk-lb__list .bsl-rowscore {
	flex: 0 0 auto;
	color: #555555;
	font-weight: 600;
}

@media ( max-width: 480px ) {
	.beanstalk-lb__list {
		grid-template-columns: 1fr;
		grid-auto-flow: row;
		grid-template-rows: none;
	}
}
