@import "normalize.css";
@import "theme.css";

body {
	display: flex;
	align-items: center;
	flex-direction: column;
	min-height: 100vh;

	padding: 3rem;
	box-sizing: border-box;
	max-width: 80rem;
	/* Center the page. Sakura's body sets `margin: auto`, but it now loads in a
	   separate <link> before this file's `@import "normalize.css"` (which resets
	   `margin: 0`), so we re-assert it here rather than depend on sheet order. */
	margin-inline: auto;
}

a {
	text-wrap: nowrap;
}

hr {
	width: 100%;
}

h1 {
	margin-bottom: 4rem;
}

form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	min-width: 35rem;
	width: 100%;

	input {
		flex-grow: 1;
	}

	input[type="checkbox"] {
		flex-grow: 0;
		margin-bottom: 0.5rem;
	}

	input[type="radio"] {
		flex-grow: 0;
	}

	div {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 1rem;
	}
}

select {
	overflow: auto;
	flex-grow: 1;
}

img {
	margin-bottom: 0;
}

#server-limits {
	align-self: flex-start;

	ul {
		margin: 0.25rem 0 1rem;
	}

	li {
		margin: 0;
	}
}

.help-icon {
	width: 2rem;
	height: 2rem;
	filter: var(--help-icon-filter);
	margin-left: 0.5rem;
}

input[type="reset"] {
	max-width: 25rem;
	align-self: center;
	order: -2;
}

/* The file input lives last in the DOM (so the multipart upload sends the other
   fields first) but belongs right below the reset button visually. */
#file {
	order: -1;
}

dialog {
	background-color: var(--app-bg);
	color: var(--app-fg);
	border-color: var(--app-accent);

	form {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}
