:root {
	/* consider: https://mycolor.space/?hex=%23F6FFDE&sub=1 */

	--text-secondary: rgba(0,0,0,0.5);
	--text-primary: #222222; /* black */
	--background: #F6FFDE;
	--accent: #2491eb;
	--text-secondary-size: 0.80em;

	--row-height: 48px;
	--big-column-width: 800px;
	--corner-radius: 8px;
	--header-height: 5vh;
	--header-height: calc(0.80em + 1.3em + 20px);
	--header-height: 4em;
}

* {
	box-sizing: border-box;
	/* transition: all 0.2s ease-in; */
}

body {
	font-size: 1.3em;
	margin: 0 2px;
	background-color: var(--text-primary);

	/* while only doing mobile view, just have one big center column
	max-width: var(--main-content-width);
	margin: auto;
	*/
}

main {
	/* max-width: var(--main-content-width);
	margin: auto;
	*/
	height: calc(100vh - var(--header-height));
	height: calc(100svh - var(--header-height));

	margin-top: var(--header-height);
	padding-bottom: 33vh; /* just a visual buffer to keep eye level */

	overflow-y: auto; /* scroll middle when large, which keeps header pinned to top */
}

* {
	font-family: system-ui;
	margin: 0;
	padding: 0;
	background-color: var(--text-primary);
}

h2 {
	background-color: var(--text-primary);
	color: var(--background);
	text-align: center;
	padding-bottom: 0.5em;
	padding-top: 0.5em;
}

.row {
	display: flex;
	justify-content: space-between;
}

.row + .row {
}

.field + .field, button + button {
}

.field {
	position: relative;
	width: 100%;

	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	border: 5px solid var(--text-primary);
	border-radius: var(--corner-radius);
	background-color: var(--background);
}

.field * {
	background-color: transparent;
}

.field label {
	left: 0;
	bottom: 0;

	display: flex;
	flex-direction: column;

	opacity: 1;
	color: var(--text-secondary);
}

.field label * {
	box-sizing: content-box;
}


.field label span {
	margin-top: 5px;
	margin-left: 5px;

	text-transform: uppercase;
	font-size: var(--text-secondary-size);

	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

.field input, textarea, select {
	width: calc(100% - 14px);
	padding: 7px;

	font-size: 1.3em;
	font-weight: bold;

	outline: none;
	border-style: none;
}

textarea {
	height: 6em;
	resize: vertical;
}

.field.col-span-1 {
	grid-column: span 1;
}

.field.col-span-2 {
	grid-column: span 2;
}

button {
	width: 100%;
	height: 100%; /* calc(0.80em + 1.3em + 20px); */
	color: var(--accent);

	font-size: var(--text-secondary-size);
	font-size: 1.3em;
	font-weight: bold;

	outline: none;
	border-style: none;
	/* text-transform: uppercase; */

	background-color: var(--background);
	background: linear-gradient(var(--background), #BEC6A7);
	border: 5px solid var(--text-primary);
	border-radius: var(--corner-radius);
	cursor: pointer;
}

.field > label:focus-within {
	box-shadow: inset 0 0 4px 4px var(--accent);
}

button:focus, button:hover {
	box-shadow: inset 0 0 4px 4px var(--accent);
}

/* https://adamschwartz.co/magic-of-css/potions/buttons/ */
/*
button:hover {
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2), 0 0.08em .24em rgba(0,0,0,0.3);
}
*/

button:active {
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2), inset 0 0.16em 0.48em rgba(0,0,0,0.4), inset 0 0 4px 4px var(--accent);
}

fieldset {
	border-left: 0;
	border-right: 0;
	border: 0;
	width: 100%;

	display: inline-grid;
	grid-template-columns: 1fr 1fr;
}

fieldset + fieldset {
}

legend {
	text-align: right;
	margin-right: 1em;
	font-weight: normal;
	font-style: italic;
	text-transform: uppercase;
	position: relative;
	visibility: hidden;
	display: none;
}

label.radio-label {
	display: flex;
	justify-content: flex-start;
	align-items: flex-start;
	flex-direction: row;
}

label.radio-label + label.radio-label {
	margin-top: 0.5em;
}

.radio-group {
	/* like a text input or some other block widget */
	padding: 7px 7px 10px 7px;
	width: calc(100% - 14px);
}

input[type=radio] {
	width: auto;
	margin-top: 12px;
}

input[type=radio]+span {
	margin-left: 15px;
	font-size: 1.3em;
	text-transform: none;

	white-space: normal;
}

input[type=radio]:checked+span {
	font-weight: bold;
	color: var(--text-primary);
}


body {
	/*
	display: flex;
	flex-direction: column;
	height: 100vh;
	*/
}


header {
	position: fixed;
	top: 0;

	height: var(--header-height);
	width: 100%;
	margin: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;

	color: gray;
	color: #fff;
	color: var(--background);
	font-weight: bold;
}

header a {
	color: var(--accent);
}

footer {
/*
	position: fixed;
	bottom: 0;
*/
}

.tab.active {
	/* consider how material design does their navbars:
	 * https://m3.material.io/components/navigation-bar/specs
	 *
	 * - navbar matches bgcolor, but all content is held in cards of different bgcolor
	 * and when active,
	 * - label bolded
	 * - icon filled
	 * - icon/tab highlighted in lighter color
	 * also note that navbar is constant height across screen resizes, ie. not measured in vh
	 */
	border: 4px solid red;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
	border-bottom: 0;
	font-size: 1.5em;
}

.in-big-column {
	max-width: var(--big-column-width);
	margin: auto;
}

.gallery-container {
	outline: none;
	/* min-height: 9rem; */
	box-sizing: border-box;
	padding: 0.5rem;
}

.gallery-container:focus-within {
	box-shadow: inset 0 0 4px 4px var(--accent);
}

.gallery {
	margin-top: 0.5rem;
	display: grid;
	grid-gap: 0.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(128px, 100%), 1fr));
}

.gallery-container span {
	color: var(--secondary-text);
	text-transform: uppercase;
	font-size: var(--text-secondary-size);

	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

.thumbnail {
	display: flex;
	aspect-ratio: 1.0;
	position: relative;
	border-radius: 0.25rem;
	border: 1px solid black;
	justify-content: center;
	overflow: hidden;
}

.single-line {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

/*
.thumbnail img {
	max-width: max-content; was needed previously to reset a tailwind default
}
*/

li {
	font-size: 2em;
}
