/*
 * Creator pages, and the line naming an uploader on a game page.
 *
 * Deliberately small: the page is the theme's, and these rules only lay out the
 * game list and keep the uploader line from colliding with the download buttons
 * above it.
 */

.im3d-rg-creator {
	margin: 0 0 2em;
}

.im3d-rg-creator-name {
	margin: 0 0 0.25em;
}

.im3d-rg-creator-count,
.im3d-rg-creator-empty {
	margin: 0 0 1.25em;
	opacity: 0.8;
}

.im3d-rg-creator-games {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im3d-rg-creator-game a {
	display: block;
	text-decoration: none;
}

.im3d-rg-creator-game img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.im3d-rg-creator-game-title {
	display: block;
	margin-top: 0.4em;
	line-height: 1.3;
}

.im3d-rg-creator-line {
	clear: both;
	margin: 0.75em 0 0;
}

/* The links a creator put on their game. */

.im3d-rg-links {
	clear: both;
	margin: 0.5em 0 0;
}

.im3d-rg-links-label {
	margin-right: 0.4em;
	opacity: 0.75;
}

.im3d-rg-link {
	display: inline-block;
	margin: 0 0.35em 0.35em 0;
	padding: 0.15em 0.6em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 3px;
	text-decoration: none;
	line-height: 1.6;
}

.im3d-rg-link:hover,
.im3d-rg-link:focus {
	border-color: currentColor;
}

/*
 * The dashboard: a list of what you sent in and what became of it.
 *
 * Laid out after the reference plugin's creator dashboard - totals across the
 * top, then a row per game with its thumbnail, state and numbers. Its colours
 * are not borrowed: that one is built for a dark purple theme and this site is
 * a light one whose palette is set in the theme options, so everything here is
 * either neutral or `currentColor` and survives the owner changing it.
 */

.im3d-rg-dashboard-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1em;
	margin: 0 0 1.25em;
	padding-bottom: 0.75em;
	/* The dotted rule under a heading is the site's own idiom - it is what the
	   sidebar's "RECENT GAMES" and "FEATURED GAMES" sit on. */
	border-bottom: 1px dotted rgba(0, 0, 0, 0.25);
}

.im3d-rg-dashboard-title {
	margin: 0;
	font-size: 1.5em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.im3d-rg-dashboard-totals {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im3d-rg-dashboard-totals li {
	min-width: 5.5em;
	padding: 0.5em 0.9em;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	text-align: right;
	background: rgba(0, 0, 0, 0.02);
}

.im3d-rg-dashboard-total {
	display: block;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.1;
}

.im3d-rg-dashboard-total-label,
.im3d-rg-dashboard-number-label {
	display: block;
	font-size: 0.75em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.im3d-rg-dashboard-actions {
	margin: 0 0 1.25em;
}

.im3d-rg-dashboard-empty {
	padding: 1.5em 0;
	opacity: 0.8;
}

.im3d-rg-dashboard-games {
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * A card per game rather than a ruled row.
 *
 * The site around this is built from boxes with their own background - the game
 * grids, the sidebar panels - so a list separated only by hairlines reads as
 * unfinished next to them.
 */
.im3d-rg-dashboard-game {
	margin: 0 0 0.75em;
	padding: 0.9em;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: #fff;
}

.im3d-rg-dashboard-game-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1em;
}

.im3d-rg-dashboard-thumb {
	flex: 0 0 auto;
	width: 120px;
}

/* 4:3, which is the shape the theme's own game listings use. */
.im3d-rg-dashboard-thumb img,
.im3d-rg-dashboard-thumb-none {
	display: block;
	width: 120px;
	height: 90px;
	object-fit: cover;
	border-radius: 4px;
}

/* A game with no thumbnail still holds its place, so rows stay aligned. */
.im3d-rg-dashboard-thumb-none {
	background: rgba(0, 0, 0, 0.07);
}

.im3d-rg-dashboard-about {
	flex: 1 1 14em;
	min-width: 0;
}

.im3d-rg-dashboard-game-title {
	margin: 0 0 0.4em;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.3;
}

.im3d-rg-dashboard-state {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin: 0;
}

.im3d-rg-dashboard-only-you {
	margin: 0.4em 0 0;
	font-size: 0.85em;
	opacity: 0.65;
}

/* Edit is the one thing this screen does besides listing, so it looks like a
   control rather than another link in a row of them. */
.im3d-rg-dashboard-edit {
	padding: 0.1em 0.7em;
	border: 1px solid currentColor;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.8;
}

.im3d-rg-dashboard-look {
	font-size: 0.9em;
}

.im3d-rg-dashboard-numbers {
	display: flex;
	flex: 0 0 auto;
	gap: 1.25em;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: right;
}

.im3d-rg-dashboard-number {
	display: block;
	font-weight: 700;
	line-height: 1.1;
}

/* The state, as a badge rather than a line of prose. */

.im3d-rg-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.8;
}

.im3d-rg-badge--published {
	color: #1f7a3d;
}

.im3d-rg-badge--waiting {
	color: #9a6700;
}

.im3d-rg-badge--draft {
	color: #5a5a5a;
}

/* Narrow screens: the numbers move under the title rather than off the edge. */
@media (max-width: 600px) {
	.im3d-rg-dashboard-numbers {
		flex-basis: 100%;
		justify-content: flex-start;
		text-align: left;
	}

	.im3d-rg-dashboard-totals li {
		min-width: 4.5em;
		padding: 0.4em 0.7em;
	}
}

/*
 * The rules for the dashboard's own file controls used to live here. They are
 * gone with the controls: changing a game now happens in the upload form, which
 * carries its own stylesheet, as it does in the original plugin.
 */

/* A game still waiting is the row worth noticing, so it is the one marked. */
.im3d-rg-dashboard-game--waiting {
	border-left: 3px solid #e0a800;
}
