/* :root {
	--body-background: #172a4f;
	--content-background-dark: #042056;
	--body-foreground: #e2dede;
	--content-background: #03265f;
	--accent-color: #facf05;
	--link-color: #0273fe;
	--border-color: #122a57;
	--orange: orange;
} */

/* :root {
	--body-background: #888;
	--content-background-dark: #bbb;
	--body-foreground: #091225;
	--content-background: #ccc;
	--accent-color: #f3be01;
	--link-color: #0273fe;
	--border-color: #999;
	--orange: #f9881d;
} */

:root {
	--body-background: #264581;
	--content-background-dark: #062d78;
	--body-foreground: #e2dede;
	--content-background: #06388a;
	--accent-color: #facf05;
	--link-color: #0273fe;
	--border-color: #122b59;
	--orange: orange;
}

@media (prefers-color-scheme: dark) {
	:root {
		--body-background: #122140;
		--content-background-dark: #010d25;
		--body-foreground: #e2dede;
		--content-background: #02193f;
		--accent-color: #facf05;
		--link-color: #0273fe;
		--border-color: #1a2d50;
		--orange: orange;
	}
}

::before,
::after {
	font-family: "Font Awesome";
	font-weight: 100;
}

body {
	background: var(--body-background);
	color: var(--body-foreground);
	font-family: "Barlow";
	font-size: clamp(1rem, 1.75vw, 1.2rem);
	margin: 0;
}

a {
	color: var(--link-color);
	text-decoration: none;
}

label,
button {
	cursor: pointer;
}

label:has(input[type=checkbox]) {
	display: flex;
	align-items: center;
	padding: 0.25rem;
}

header label:has(input[type=checkbox]:checked) {
	color: green;
}

label:has(input[type=checkbox]:focus) {
	outline: 2px solid;
	border-radius: 0.5rem;
}

input[type=checkbox] {
	opacity: 0;
	pointer-events: none;
	position: absolute;
}

label:has(input[type=checkbox])::before {
	content: "";
	border: 1px solid var(--body-foreground);
	width: 1rem;
	height: 1rem;
	vertical-align: bottom;
	margin-right: 0.3rem;
	border-radius: 0.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	font-size: 0.6em;
}

header label:has(input[type=checkbox]:checked)::before {
	border-color: green;
}

label:has(input[type=checkbox]:checked)::before {
	content: "\f00c";
	font-weight: bold;
}

/* body > header, */
main {
	background: var(--content-background);
	max-width: 1024px;
	margin: 0 auto;
	box-sizing: border-box;
}

main > header nav {
	background-color: var(--content-background-dark);
	border-bottom: 2px solid var(--border-color);
	padding: 0.25rem 1rem 0;
	font-family: 'Barlow Condensed';
	display: flex;

	align-items: center;
	justify-content: space-between;
	width: 100%;
	font-family: "Barlow Condensed";
	margin-bottom: 1rem;
}

main > header nav ul {
	display: flex;
	list-style: none;
	gap: 2rem;
	margin: 0;
	padding: 0;
	width: 100%;
}

main > header nav ul li {
	padding: 0.5rem 0;
	display: flex;
	align-items: center
}

main > header nav ul li.home {
	padding: 0;
	border-bottom: 2px solid transparent;
}

main > header nav ul li.home + li.home {
	margin-right: auto;
}

main > header nav ul li.active {
	border-bottom: 2px solid var(--accent-color);
}

main > header nav ul li.home a {
	display: flex;
	align-items: center;
}

main > header nav ul li.active a {
	color: var(--body-foreground);
}

main > header nav ul a::before {
	margin-right: 0.5em;
}

main > header nav ul li.active a::before {
	font-weight: 700;
}

main > header nav ul li.home span {
	background-size: contain;
	background-repeat: no-repeat;
	width: 1.5rem;
	height: 1.5rem;
	font-weight: 400;
	display: inline-flex;
	align-items: center;
	border-radius: 0.25rem;
	margin-right: 0.5rem;
}

main > header nav ul li.agent.home span {
	background-image: url(https://static.breaklegs.app/app/images/icon-256.png);
}

main > header nav ul li.goodshow.home span {
	background-image: url(https://static.breaklegs.app/app/images/icon-256.png);
}

input[type=search] {
	background: var(--content-background-dark);
	border: 2px solid var(--border-color);
	margin-left: 1rem;
	color: var(--body-foreground);
	border-radius: 0.5rem;
	/* align-self: center; */
	max-width: 20ch;
	width: 10ch;
	padding: 0.25rem;
	flex: 1;
	font: inherit;
	font-size: 0.8em;
}

input[type=search]:focus-visible {
	outline: 0.1px solid;
}

main {
	padding: 1rem;
	padding-top: 0;
	min-height: 100vh;
}

main > header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 0 1rem;
	flex-wrap: wrap;
	margin: 0 -1rem;
}

main > header h1 {
	font-size: 1.6em;
	font-weight: 500;
	margin: 0;
	margin-left: 1rem;
}

main > header h1::before {
	font-weight: bold;
	margin-right: 0.5em;
	color: var(--accent-color);
}

main > header h1.directory::before,
nav .directory a::before {
	content: "\f2b9";
}

main > header h1.performances::before,
nav .performances a::before {
	content: "\e533";
}

main > header h1.reviews::before,
nav .reviews a::before {
	content: "\f005";
}

main > header > a {
	background: var(--link-color);
	color: var(--foreground-color);
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	font-size: 0.9em;
	font-family: "Barlow Semi Condensed";
	margin-right: 1rem;
}

main section > header > a.tpane::before {
	content: "\e24e";
}

main section > header > a.leave.tpane::before {
	content: "\e66c";
}

main section > header > a.calendar::before {
	content: "\f073";
}

main section > header {
	background-color: var(--content-background-dark);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: 1.5rem;
	/* margin: 1rem 0; */
	padding: 0.5rem 1rem;
	border: 2px solid var(--border-color);
	border-radius: 0.5rem;
	font-size: 0.9em;
	font-family: "Barlow Semi Condensed";
}

main section > header > a:last-of-type {
	margin-right: auto;
}

main section > header > a::before {
	margin-right: 0.4em;
}

main section h3 {
	margin: 0;
	font-weight: inherit;
	font-size: 0.8em;
	text-align: center;
}

main button {
	appearance: none;
	border: 0;
	background: var(--link-color);
	color: var(--body-foreground);
	border-radius: 0.5rem;
	font: inherit;
	padding: 0 0.5rem 0.05rem;
}

button.filter {
	appearance: none;
	background: var(--content-background);
	color: var(--foreground-color);
	font: inherit;
	border: 2px solid var(--border-color);
	border-radius: 0.5rem;
}

body:has(#filter input:not([value="2"]):checked) button.filter {
	color: green;
	border-color: green;
}

button.filter::before {
	content: "\f0b0";
	margin-right: 0.5rem;
}

main section > header ~ div:has(h4) {
	display: flex;
	width: 100%;
	justify-content: space-between;
	align-items: end;
	/* font-size: 1.1em; */
}

main section > header ~ div:has(h4),
main section > h2 {
	position: sticky;
	top: 0;
	z-index: 3;
	background-color: var(--content-background);
	padding-bottom: 0.5rem;
}

main section h2,
main section h4 {
	font: inherit;
	font-size: 1.2em;
	margin: 0;
}

main section div.search {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1rem;
	margin-bottom: 1px; /* for the search input */
}

ul.listings {
	display: grid;
	gap: 1rem;
	margin: 0;
	list-style: none;
	padding: 0;
}

section > header + ul.listings {
	margin-top: 1rem;
}

ul.listings li {
	background: var(--content-background-dark);
	border: 2px solid var(--border-color);
	border-radius: 0.5rem;
	padding: 0.5rem 1rem 1rem;
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "dates dates dates"
						"image contents contents"
						"ignore tags tags"
						"children children children";
	align-items: center;
	position: relative;
}

ul.listings li.hidden {
	display: none;
}

#results header.new ~ ul.listings li:not(.new),
#results header:not(.ignored) ~ ul .ignored,
#results header.new ~ ul.calendar-grid div div:not(.new) {
	display: none;
}

.listings * {
	margin: 0;
}

.contents {
	grid-area: contents;
	position: relative;
	padding-right: 1.5rem;
}

.ignore {
	grid-area: ignore;
	color: var(--link-color);
	display: flex;
	justify-content: center;
	font-size: 0.8em;
	height: 100%;
	align-items: center;
	padding: 0.25rem 0;
}

.ignore input {
	position: absolute;
	pointer-events: none;
	opacity: 0;
	width: 0;
}

.ignore label {
	z-index: 2;
}

.ignore label::before {
	content: "\f070";
	margin-right: 0.25rem;
}

li.ignored .ignore span.hide,
li:not(.ignored) .ignore span.show {
	display: none;
}

.contents .text {
	font-size: 1.3em;
}

.contents .detail-text {
	font-size: 1.1em;
	/* margin-top: 0.25em; */
	/* margin-bottom: auto; */
}

.contents .details {
	margin-top: 0.5em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	font-size: 0.9em;
	flex-basis: 100%;
	overflow: hidden;
	line-height: 1.35;
	font-family: "Barlow Semi Condensed";
}

html[data-searching] li:not(.hidden) .contents .details {
	-webkit-line-clamp: 100;
}

.contents .details::after {
	position: absolute;
	right: 0;
	display: flex;
	top: 0;
	bottom: 0;
	align-items: center;
	content: "\f054";
	font-weight: 700;
}

.listings .filters {
	grid-area: tags;
	font-size: 0.8em;
	overflow-wrap: normal;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.5rem 0 0;
}

.filters span {
	padding: 0 0.5em 0.2em;
	border-radius: 0.5em;
	/* line-height: 1.2; */
	background: var(--border-color);
}

#results .dates {
	grid-area: dates;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0;
	padding: 0rem 0 0.5rem;
	gap: 1rem;
	margin-bottom: 0.5rem;
	border-bottom: 1px solid var(--accent-color);
	/* border-bottom: 2px solid var(--border-color); */
}

#results .dates span.ending-soon,
#results span.opening-show,
#results span.closing-show {
	color: var(--orange);
}

span.new {
	color: green !important;
}

main section .view {
	position: absolute;
	left: 0;
	top: 0;
	font-size: 0;
	color: transparent;
	padding: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	/* pointer-events: none; */
}

main section .image {
	background: no-repeat;
	background-position: center;
	position: relative;
	min-width: 3rem;
	margin-right: 1rem;
	width: 25vw;
	aspect-ratio: 16 / 9;
	background-size: cover;
	max-width: 240px;
	grid-area: image;
}

@supports not (aspect-ratio: auto) {
	main section .image {
		padding-top: 56.25%; /* Maintain aspect ratio */
	}
}

main section li.contain .image {
	background-size: contain;
}

#filter {
	/* display: none; */
	/* background: var(--content-background-dark); */
	/* color: var(--body-foreground); */
	/* z-index: 4; */
}

html.filtered #filter {
	/* display: block; */
}

#filter h3 {
	margin: 0;
}

dialog {
	background: none;
	border: 0;
}

dialog form {
	background: var(--content-background);
	color: var(--body-foreground);
	box-sizing: border-box;
	max-width: min(800px, 100vw);
	border: 0;
	padding: 1rem;
	position: relative;
	box-sizing: border-box;
	pointer-events: all;
}

dialog > form > div {
	overflow: auto;
	max-height: calc(100vh - 10rem - env(safe-area-inset-bottom) - env(safe-area-inset-top));
	margin-right: -1rem;
	padding-right: 1rem;
}

dialog legend {
	font-size: 1.2em;
}

dialog fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

dialog[open] {
  opacity: 1;
}

dialog::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition:
	display 0.4s allow-discrete,
	overlay 0.4s allow-discrete,
	opacity 0.4s ease-out,
	background-color 0.4s;
  /* Equivalent to
  transition: all 0.7s allow-discrete; */
}

dialog[open]::backdrop {
	background: #000;
	opacity: 0.75;
}

dialog button.close {
	border: 0;
	width: auto;
	display: block;
	font-size: 0;
	padding: 0;
	clip-path: circle(50%);
	background: black;
	right: 0;
	position: sticky;
	left: 100%;
	transform: translate(100%, -100%);
	margin: 0 0 -2rem -1rem;
	top: 1rem;
	color: var(--link-color);
}

dialog button.close::before {
	pointer-events: all;
	content: "\f057";
	font-size: 2rem;
}

/* This starting-style rule cannot be nested inside the above selector
because the nesting selector cannot represent pseudo-elements. */

@starting-style {
  dialog[open]::backdrop {
	opacity: 0;
	background-color: rgb(0 0 0 / 0%);
  }
}

dialog > div > :last-child {
	margin-bottom: 0;
}

dialog button.close {
	border: 0;
	width: auto;
	display: block;
	font-size: 0;
	padding: 0;
	clip-path: circle(50%);
	background: black;
	right: 0;
	position: sticky;
	left: 100%;
	transform: translate(100%, -100%);
	margin: 0 0 -2rem -1rem;
	top: 1rem;
}

dialog button.close::before {
	pointer-events: all;
	/* color: #888; */
	content: "\f057";
	font-size: 2rem;
}

dialog button:not(.close) {
	background: var(--link-color);
	color: var(--foreground-color);
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	font-weight: 500;
	border: 0;
}

dialog button.done {
	position: sticky;
	bottom: 0;
	margin-top: 1rem;
	width: 100%;

	display: none; /* try without it, since there's now a close button and esc key */
}

html:has(dialog[open]) {
	overflow: hidden;
}

/* for safari mobile, which still doesn't work very well */
html:has(dialog[open]) body {
	pointer-events: none;
}

dialog {
  /* opacity: 0; */
  /* transform: scaleY(0); */
  transition:
	opacity 0.4s ease-out,
	overlay 0.4s ease-out allow-discrete,
	display 0.4s ease-out allow-discrete;
  /* Equivalent to
  transition: all 0.7s allow-discrete; */
}

/*   Before-open state  */
/* Needs to be after the previous dialog[open] rule to take effect,
	as the specificity is the same */
@starting-style {
  dialog[open] {
	opacity: 0;
  }
}

dialog > form > div > :last-child {
	margin-bottom: 0;
}

dialog ul {
	list-style: none;
	margin: 0;
	padding: 0;
	margin-top: 1rem;
	display: grid;
	row-gap: 0.5rem;
}

dialog ul input {
	width: 0;
}

dialog ul label {
	border: 1px solid var(--link-color);
	padding: 0 0.5rem 0.1rem;
	border-radius: 0.5rem;
	color: var(--link-color);
}

dialog ul input:checked + label {
	background: var(--link-color);
	/* color: var(--body-foreground); */
	color: var(--content-background-dark);
}

dialog li {
	display: flex;
	align-items: center;
}

dialog li span {
	flex: 1;
}

@media screen and (max-width: 728px) {
	body {
		font-size: clamp(1rem, 4.75vw, 1.5rem);
	}

	body > header {
		/* padding-bottom: 0.5rem; */
	}

	main > header nav ul {
		gap: 1rem;
	}

	main > header nav ul li {
		padding: 0.5rem 0;
		/* order: 2; */
	}

	main > header nav ul li.active {
		/* order: 1; */
	}

	main > header nav ul li span {
		font-size: 0;
	}

	/* main > header nav ul li:not(.active) span {
		font-size: 0;
	}

	main > header nav ul li:not(.active) a::before {
		margin: 0;
	} */

	main > header nav ul li a::before {
		margin: 0;
	}

	main {
		padding-inline: 0.5rem;
	}

	main > header {
		padding: 0;
		padding-bottom: 0.5rem;
		margin: 0 -0.5rem;
	}

	main > header nav {
		padding-top: 0;
		margin-bottom: 0.5rem;
	}

	main > header h1 {
		font-family: "Barlow Condensed";
		/* margin-left: 1rem; */
	}

	main > header > a {
		padding: 0.15rem 0.5rem 0.25rem;
		/* margin-right: 1rem; */
	}

	main > header span {
		font-size: 0;
	}

	/* main > header span,
	main section > header span {
		font-size: 0;
	} */

	main section > header {
		/* margin: 0.5rem 0 0; */
		column-gap: 0;
		row-gap: 1rem;
		font-family: "Barlow Condensed";
		justify-content: space-between;
		padding: 0.25rem 0.5rem;
	}

	main section > header a:last-of-type {
		margin-right: 0;
	}

	main section > header ~ div:has(h4) {
		font-family: "Barlow Condensed";
	}

	main section h3 {
		/* margin: 0 0 0.5rem 0; */
	}

	button.filter {
		/* flex-basis: 100%; */
	}

	a.tpane {
		display: none;
	}

	ul.listings li {
		grid-template-areas: "dates"
							"image"
							"ignore"
							"contents"
							"tags"
							"children";

		grid-template-columns: 1fr;
	}

	main section .image {
		max-width: none;
		width: 100%;
		margin: 0;
	}

	.contents .text,
	.contents .detail-text {
		font-family: "Barlow Condensed";
	}

	.contents .detail-text {
		margin: 0;
	}

	#results .dates {
		font-family: "Barlow Condensed";
	}

	.ignore {
		margin: 0.25rem 0;
	}

	dialog ul {
		font-family: "Barlow Condensed";
	}
}

iframe,
html.tpane.details main > header {
	display: none;
}

html.tpane.details main {
	padding-top: 1rem;
}

@media screen and (min-width: 1080px) {
	html.tpane body {
		display: flex;
		align-items: start;
	}

	/* html.tpane body > header {
		margin: 0;
		height: 100vh;
		display: flex;
		flex-direction: column;
		padding: 1rem 1rem 0;
	}

	html.tpane main > header nav ul {
		flex-direction: column;
		gap: 1rem;
	}

	html.tpane main > header nav ul li.home + li.home {
		margin: 0;
		margin-bottom: 2rem;
	} */

	html.tpane main {
		flex: 2;
		margin: 0;
		height: 100vh;
		overflow: auto;
		/* padding-top: 1rem; */
		/* box-sizing: border-box; */
	}

	html.tpane main section > header ~ div:has(h4),
	html.tpane main section > h2 {
		top: -1rem;
	}

	html.tpane main section .view:not(.tpane) {
		display: none;
	}

	iframe {
		display: block;
		flex: 1;
		border: 0;
		height: 100vh;
		margin: 0;
		padding: 0;
		border-left: 2px solid var(--accent-color);
		min-width: 40%;
	}
}





article {
	padding: 0 0.5rem 2rem;
}

article h1 {
	margin: 1rem 0 0 0;
	font-weight: 600;
	font-style: italic;
}

article p.theatre {
	margin: 0;
}

article img.image {
	float: right;
	margin: 0 0 1rem 1rem;
	max-width: 30%;
}

article p.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	/* font-size: 0.8em; */
	font-family: 'Barlow Condensed';
	margin: 0;
	margin-top: 0.5rem;
}

article ul.reviews {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
}

@media screen and (max-width: 728px) {
	article h1 {
		font-family: 'Barlow Condensed';
		font-weight: 400;
		font-size: 1.5em;
	}
}