@import url(https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap);
:root {
	--color-bg: #e5f0ed;
	--color-light: #46923c;
	--color-med: #276221;
	--color-dark: #0c341c;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	padding: 0;
	background: var(--color-bg);
	color: var(--color-dark);
	font: 18px Nunito, sans-serif;
	counter-reset: rank;
}
h1 {
	text-align: center;
	line-height: 1em;
}
h1 span {
	display: block;
	font-size: 1rem;
	line-height: 1em;
}
h2, h3 {
	text-align: center;
}
a {
	color: var(--color-med);
}
#favorites-nav {
	background: var(--color-dark);
	white-space: nowrap;
	overflow-x: auto;
}
#my-favorite {
	vertical-align: middle;
	color: var(--color-bg);
}
#favorites-nav ul {
	display: inline-block;
	vertical-align: middle;
	list-style: none;
	margin: 0;
	padding: 0;
}
#favorites-nav li {
	display: inline-block;
}
#favorites-nav a {
	display: inline-block;
	height: 50px;
	color: var(--color-bg);
	vertical-align: bottom;
	text-decoration: none;
	padding: 0.7em 0.5em 0.4em 0.5em;
	/* background positioning only works on background-image */
	background: linear-gradient(var(--color-bg),var(--color-bg)) 0 50px / 100% no-repeat;
	transition: all 0.3s ease-out;
}
#favorites-nav a.active,
#favorites-nav a:hover {
	background-position: top;
	color: var(--color-med);
}
#favorites-nav #home-link {
	padding: 0;
	border: 0;
}
#favorites-nav #home-sig {
	width: 90px;
	height: 50px;
	object-fit: cover;
	object-position: center 10%;
	vertical-align: middle;
}
.favorites-list {
	/* background: white; */
	margin: 1em auto;
	padding: 0.5rem;
	max-width: 42em;
	border: 0;
	border-radius: 1rem;
	border-collapse: collapse;
	overflow: hidden;
	counter-reset: rank; /* reset if multiple tables on a page */
}

.photo-icon {
	display: inline-block;
	height: 1.5em;
	vertical-align: middle;
	padding: 0.2em;
}
.thumbnail {
	display: block;
	width: 4em;
	height: 3em;
	object-fit: cover;
}
td:has(.thumbnail) {
	padding: 0;
	align-self: stretch;
}

#favorites-list-minis {
	text-align: center;
}
.favorites-list.mini {
	display: inline-block;
	vertical-align: top;
	background: white;
	width: 100%;
	max-width: 336px;
	text-align: left;
	counter-reset: rank;
}
.favorites-list.mini h3 {
	margin: 0;
}
.favorites-list.mini strong {
	cursor: pointer;
}
.favorites-list.mini strong::after {
	content: " ▾";
}
.favorites-list.mini p {
	margin: -0.3em auto 1em auto;
	text-align: center;
}
.favorites-list.mini ul {
	display: none;
	list-style: none;
	margin-top: 0.5rem;
	padding-left: 1rem;
}

tr {
	display: grid;
	grid: auto / 3em 1fr auto;
	align-items: center;
	/* border-bottom: 1px solid #eee; */
	background: linear-gradient(white 90%, #eee);
}
tr:last-of-type {
	border-bottom: 0;
}
th {
	text-align: left;
}
th, td {
	padding: 0.6rem;
	transition: background-color 0.5s;
}
.highlighted {
	background-color: #ffb;
}
th[colspan="3"] {
	grid-column: span 3;
	text-align: center;
}


/* --- Incrementing numbers --- */
tbody tr::before,
.favorites-list.mini > div > div::before {
	counter-increment: rank;
	content: "#" counter(rank);
	display: inline-block;
	font-size: 1.2em;
	font-weight: bold;
	color: var(--color-med);
	text-align: center;
	margin-left: 0.2em;
	min-width: 2.2em;
	letter-spacing: -0.04em;
}
tr:nth-of-type(n+251) {
	/* hide any over top 250 */
	/* note: opposite selector (for click-to-show, etc.) would be :nth-of-type(-n+250) */
	display: none;
}
#buttons {
	font-size: 0.7em;
	text-align: center;
}

td:first-of-type {
	font-weight: bold;
}
td:nth-of-type(2) {
	text-align: right;
}

.descriptor {
	color: var(--color-med);
	font-size: 0.8em;
	font-weight: normal; /* even inside bold div */
	margin: 0.2em;
}
th .descriptor {
	margin: 0;
}
.review {
	grid-column: span 4;
	/* background: linear-gradient(45deg, #fed, #def) fixed; */
	/* box-shadow: inset 0 0.1em 0.2em #0004; */
	padding: 1em;
	font-size: 0.8em;
}

/* --- Hide reviews --- */
#favorite-paintings .review,
#favorite-movies .review,
#favorite-tv-shows .review {
	display: none;
}

/* -- FAVORITE ALBUMS -- */
#favorite-albums tr {
	grid: auto auto / auto 1fr;
}
#favorite-albums tr::before {
	grid-row: span 3;
}
#favorite-albums td {
	padding: 0.1rem 1rem;
}
#favorite-albums td:nth-of-type(2) {
	text-align: left; /* override standard right */
}
#favorite-albums .review,
#favorite-albums .cover {
	display: none;
}
.coaster-info {
	display: grid;
	grid: auto-flow / auto auto;
	grid-gap: 0 0.5em;
	font-size: 0.8em;
	border: 1px solid var(--color-med);
	border-radius: 0.5em;
	margin: 0.2em;
	padding: 0.2em;
}
.coaster-info div:nth-of-type(2n-1) {
	font-weight: bold;
	text-align: right;
}


/* --- Featured albums --- */
#favorite-albums tr.featured {
	/* mobile first - stack year */	
	grid: "num cover name"
		  "num cover artist"
		  "num cover year" / auto auto 1fr;
}
#favorite-albums tr.featured::before {
	grid-area: num;
}
#favorite-albums tr.featured .name {
	grid-area: name;
	font-size: 1.3em;
	padding-bottom: 0;
	align-self: end;
}
#favorite-albums tr.featured .artist {
	grid-area: artist;
	text-align: left;
	padding-top: 0;
	align-self: start;
}
#favorite-albums tr.featured .cover {
	display: block;
	grid-area: cover;
	width: 100px;
	padding: 0;
}
.cover img {
	display: block;
	width: 100px;
}
#favorite-albums tr.featured .year {
	grid-area: year;
}
/* #favorite-albums tr.featured .review {
	display: block; 
	grid-area: review;
} */


/* --- Favorite Albums by year bar graph --- */
.graph {
	display: grid;
	grid: 1fr auto / auto-flow;
	grid-auto-flow: column;
	align-items: end;
	/* background: white; */
	font-size: 12px;
	width: 100%;
}
.graph > div.year-bar {
	/* background: royalblue; */
	background: color-mix(in srgb, var(--color-med) 90%, transparent);
	text-align: center;
	align-content: end;
	color: #fffa;
}
.year-label {
	transform: rotate(-90deg) translatex(-1.5em);
	font-weight: bold;
	max-width: 1.2em;
	justify-self: center;
	background: white;
}
#all-years-graph {
	display: none; /* It ain't fit on the mobile */
	margin: 1rem auto;
	padding: 30px 4px;
	border-radius: 0.5em;
	padding-bottom: 2rem;
	background: linear-gradient(#fff 29px, #6666 30px, #6666 30px) top / auto 30px;
}
#album-search {
	display: block;
	margin: 0 auto;
	font: inherit;
	width: 100%;
	max-width: 42em;	
}
.searchHidden {
	visibility: hidden;
	height: 0;
	border: 0;
}
#magic-list {
	display: none;
}
#favorite-cars-more {
	counter-set: rank 10;
}

#favorite-meals tr {
	grid: auto auto / auto 1fr;
	grid-auto-flow: column;
}
#favorite-meals ol,
#favorite-meals ul {
	padding-left: 1.2em;
}

caption {
	font-weight: bold;
	font-size: 1.2em;
}
caption .descriptor {
	font-size: 1rem;
	margin-top: 0;
}


@media screen and (min-width:700px) {
	.favorites-list {
		padding: 1rem;
	}
	.grid-of-tables {
		display: grid;
		grid: auto-flow / 1fr 1fr;
		grid-gap: 1em;
		align-items: start;
		padding: 1em;
	}
	.grid-of-tables table {
		background: white;
	}
	#all-years-graph {
		display: grid;
	}
	#favorite-albums tr {
		grid: auto / 3em 2fr 1fr auto;
	}
	#favorite-albums tr::before {
		grid-row: span 1;
	}
	#favorite-albums tr.featured {
		grid: "num cover name   year" 1fr
	          "num cover artist artist" 1fr / auto 1fr 8fr auto;
	}
	#favorite-albums td {
		padding: 0.6rem;
	}
	#favorite-albums td:nth-of-type(2) {
		text-align: right;
	}
	#favorite-meals tr {
		grid: auto / 3em 1fr auto;
	}
}