/* The mod's in-game parts, rebuilt for the web: stone buttons, status pills, panels, slots. */

/* Vanilla stone button: black outline, light top-left bevel, dark bottom-right, white outline on hover. */
.mc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-height: 2.5rem;
	padding: 0.45em 1.2em;
	font: 1rem/1 var(--pixel);
	color: var(--white);
	text-decoration: none;
	text-shadow: 0.125em 0.125em 0 #3f3f3f;
	background: #4a4a4a;
	border: 2px solid #000;
	box-shadow:
		inset 2px 2px 0 rgb(255 255 255 / 0.24),
		inset -2px -3px 0 rgb(0 0 0 / 0.38);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 120ms ease-out;
}

.mc-btn:hover {
	color: var(--white);
	border-color: var(--white);
}

.mc-btn:active {
	box-shadow:
		inset 2px 3px 0 rgb(0 0 0 / 0.38),
		inset -2px -2px 0 rgb(255 255 255 / 0.18);
}

.mc-btn:focus-visible {
	outline: none;
	border-color: var(--white);
}

/* Green label: the mod's primary actions (Manage, Install, Save). */
.mc-btn--go {
	color: var(--green);
	text-shadow: 0.125em 0.125em 0 var(--green-deep);
}

.mc-btn--go:hover {
	color: #6dffb0;
}

.mc-btn--go::before {
	content: "";
	width: 0.875em;
	height: 0.875em;
	background: currentColor;
	mask: url("../assets/img/icons/download.svg") center / contain no-repeat;
	filter: drop-shadow(0.125em 0.125em 0 var(--green-deep));
}

.mc-btn[aria-disabled="true"] {
	color: #a0a0a0;
	background: #3a3a3a;
	border-color: #000;
	box-shadow: none;
	text-shadow: none;
	pointer-events: none;
}

/* Status pills, like "running" next to a server's name. */
.pill {
	display: inline-block;
	padding: 0.15em 0.55em;
	font: 0.8125rem/1.4 var(--pixel);
	border: 1px solid currentColor;
	white-space: nowrap;
}

.pill--live {
	color: var(--green);
	background: rgb(26 215 111 / 0.08);
}

.pill--muted {
	color: var(--muted);
}

a.pill {
	text-decoration: none;
}

a.pill:hover {
	color: var(--white);
	background: rgb(26 215 111 / 0.18);
}

/* In-game panel: dark glass over the world, one keyline. */
.panel {
	background: var(--panel);
	border: 1px solid var(--line);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.panel__title {
	font-size: 1.25rem;
	color: var(--white);
	margin-bottom: 1.25rem;
}

.section-title {
	font-size: clamp(1.375rem, 2.6vw, 1.75rem);
	color: var(--white);
	text-shadow: 0.1em 0.1em 0 #2b2b2b;
	margin-bottom: 1.5rem;
}

/* The version table: the page's main job. */
.versions__table {
	width: 100%;
	border-collapse: collapse;
}

.versions__table thead th {
	font: 0.8125rem/1.4 var(--pixel);
	color: var(--muted);
	text-align: left;
	padding: 0 1rem 0.75rem;
	border-bottom: 1px solid var(--line);
}

.versions__table tbody th,
.versions__table tbody td {
	padding: 1.1rem 1rem;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--line);
	font-weight: 400;
}

.versions__table tbody tr:last-child > * {
	border-bottom: 0;
}

.versions__table tbody tr {
	transition: background-color 160ms ease-out;
}

.versions__table tbody tr:hover {
	background: rgb(255 255 255 / 0.035);
}

.mc {
	display: block;
	font: 1.75rem/1.1 var(--pixel);
	color: var(--white);
	text-shadow: 0.1em 0.1em 0 #3f3f3f;
}

.also {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.file__name {
	display: block;
	font: 0.8125rem/1.5 var(--pixel);
	color: var(--text);
	overflow-wrap: anywhere;
}

.file__size {
	display: block;
	font-size: 0.875rem;
	color: var(--muted);
}

.act {
	text-align: right;
	width: 1%;
}

/* Rows fill in from the newest release: text arrives, the placeholder fades out. */
[data-versions] .file__name {
	transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-versions]:not(.is-live) .file__name {
	opacity: 0.45;
}

/* Lists with the mod's square bullets. */
.bullets {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bullets li {
	position: relative;
	padding-left: 1.25rem;
	margin-top: 0.5rem;
}

.bullets li::before,
.prose li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.4rem;
	height: 0.4rem;
	background: var(--green);
}

/* Inventory slot: the inverse bevel of a button, holding the step number. */
.step__no {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	font: 1.25rem/1 var(--pixel);
	color: var(--white);
	text-shadow: 0.1em 0.1em 0 #3f3f3f;
	background: #5f5f5f;
	box-shadow:
		inset 2px 2px 0 #262626,
		inset -2px -2px 0 #a9a9a9;
}

/* Screenshots open full size in the viewer. */
.shot {
	margin: 0;
}

.shot__open {
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid #000;
	background: #000;
	cursor: zoom-in;
	box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.45);
	transition: border-color 120ms ease-out;
}

.shot__open:hover,
.shot__open:focus-visible {
	outline: none;
	border-color: var(--white);
}

.shot figcaption {
	margin-top: 0.6rem;
	font-size: 0.9375rem;
	color: var(--muted);
}

/* Questions open like in-game dropdowns. */
.qa {
	background: var(--panel);
	border: 1px solid var(--line);
}

.qa + .qa {
	margin-top: 0.5rem;
}

.qa summary {
	position: relative;
	padding: 1rem 3rem 1rem 1.25rem;
	font: 1rem/1.4 var(--pixel);
	color: var(--white);
	cursor: pointer;
	list-style: none;
}

.qa summary::-webkit-details-marker {
	display: none;
}

/* A pixel plus that loses its upright bar when open. */
.qa summary::after {
	content: "";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	width: 0.75rem;
	height: 0.75rem;
	transform: translateY(-50%);
	background:
		linear-gradient(var(--green), var(--green)) center / 100% 2px no-repeat,
		linear-gradient(var(--green), var(--green)) center / 2px 100% no-repeat;
}

.qa[open] summary::after {
	background: linear-gradient(var(--green), var(--green)) center / 100% 2px no-repeat;
}

.qa summary:hover {
	background: rgb(255 255 255 / 0.03);
}

.qa p {
	padding: 0 1.25rem 1.25rem;
	max-width: 68ch;
	color: var(--text);
}

/* Release notes rendered from the release. */
.prose {
	max-width: 70ch;
}

.prose > * + * {
	margin-top: 0.85rem;
}

.prose h2 {
	font-size: 1.125rem;
	color: var(--white);
	margin-top: 2rem;
}

.prose h2:first-child {
	margin-top: 0;
}

.prose h3,
.prose h4 {
	font-size: 1rem;
	color: var(--white);
	margin-top: 1.5rem;
}

.prose ul {
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.prose li {
	position: relative;
	padding-left: 1.25rem;
	margin-top: 0.45rem;
}

.prose strong {
	color: var(--white);
	font-weight: 600;
}

/* Full-size screenshot viewer. */
.viewer {
	width: min(96vw, 112rem);
	max-height: 94vh;
	padding: 0;
	color: var(--text);
	background: var(--panel-solid);
	border: 2px solid #000;
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.6);
}

.viewer::backdrop {
	background: rgb(0 0 0 / 0.8);
	backdrop-filter: blur(6px);
}

.viewer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0.75rem 0.75rem 1.25rem;
	border-bottom: 1px solid var(--green);
}

.viewer__caption {
	font-size: 0.9375rem;
	color: var(--muted);
}

.viewer__img {
	width: 100%;
	max-height: calc(94vh - 4rem);
	object-fit: contain;
	background: #000;
}

.viewer[open] {
	animation: viewer-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes viewer-in {
	from {
		opacity: 0;
		transform: translateY(0.75rem) scale(0.985);
	}
}
