body, html { margin: 0; }

body:not(.iframe) {
	background-color: var(--d-purple);
	background-image: url('/graphix/bg/rainbow-paw-stars.png');
	background-size: min(400px, 50vw, 50vh);
}

body .main-container {
	margin: 0 auto;
	font-size: 1.125rem;
	text-align: left;
	color: var(--l-blue);
	height: auto; 
}
body:not(.iframe) .main-container {
	background-color: var(--dd-purple);
	padding: 2em .75em .5em .75em;
	min-height: calc(100vh - 1rem);
	
	@media screen and (width > 500px) {
		width: min(1000px, 80%);
	}
	@media screen and (width <= 500px) {
		width: 100%;
		-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
	}
}
/* when page is not in iframe */
body:not(.iframe) {
	background-color: var(--d-purple);
	background-image: url('/graphix/bg/rainbow-paw-stars.png');
	background-size: min(400px, 50vw, 50vh);
	.iframe-only { display: none; }
}
/* when page is in iframe */
.iframe {
	.main-container {
		width: auto;
		padding: .75em;
		min-height: 100%;
	}
	/* hide regular title, title navigation links */
	#title, #links { display: none; }
}

img { max-width: 100% }
img.tall { max-height: max(300px,min(90vh,500px)); }
img.mini { max-height: 1em; }

/* scrollbar */
::-webkit-scrollbar { width: 15px; } /* width */
::-webkit-scrollbar-track { /* Track */
	background-color: var(--dd-blue);
	box-shadow: inset 0 0 5px var(--dd-purple);
	border-radius: 0;
}
::-webkit-scrollbar-thumb { /* Handle */
	background: var(--green);
	box-shadow: inset 0 0 5px var(--green);
	border-radius: 0;
}

.title {
	display: block;
	text-align: center;
	font-size: max(1em, min(10vw,2em));
	font-weight: normal;
	h1 {
		font-family: 'Super Comic';
		/* remove html default header styling */
		margin: 0; line-height: inherit; font-weight: inherit; font-size: inherit;
	}
}
.title, .title:link, .title:visited { color: var(--pink); }
.title img.block {
	display: block;
	margin: 0 auto;
}
.title img:not(.block) {
	height: 1em;
	margin-bottom: -.1em;
}
/* when page is in iframe */
.iframe .title { font-size: 1em; }

.subtitle {
	color: var(--green);
	display: block;
	text-align: center;
}
a:hover .subtitle { color: var(--yellow); }

#links { text-align: center; margin: 0 auto 1em auto; }

#sort-filter {
	margin-top: .75rem;
	
	h3 {
		margin: 0;
		font-family: 'Super Comic';
		font-weight: normal;
		color: var(--yellow);
	}
}

#sort-updates, #all-tags {
	margin-top: .5em;
	/* button container divs */
	> div { display: inline-block; }
	button {
		padding: 0.1em 0.5em; margin: 0.25em;
		background: var(--d-purple); border: 2px var(--purple) solid; color: var(--pink);
		&:hover { color: var(--yellow); }
	}
}
#all-tags button {
	&.tag-name { width: 10em; margin-right: 0; border-right: 0; }
	&.add-tag {
		background: var(--purple);
		color: var(--d-purple);
		margin-left: 0; 
		order-left: 0;
		&.included { background: var(--green); }
		&.excluded { background: var(--yellow); }
	}
}

/* updates list styling */
.updatelist { padding: 0 5% 0 8%; list-style: none; }
/* when page is in iframe */
.iframe  .updatelist { padding: 0; }

.update { margin-bottom: 0.75em; }

.update:before { /* custom size image bullet points */
  content: '';
  display: inline-block;
  height: 1em;
  width: 1.5em;
  background-image: url('/graphix/deco/smiley-spin-green.gif');
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: -1.5em; /* should be negative same as width */
}
/* alternate image bullet points */
.update:nth-child(2n+1):before { background-image: url('/graphix/deco/smiley-spin-yellow.gif'); }
.update:nth-child(3n+1):before { background-image: url('/graphix/deco/smiley-spin-pink.gif'); }

.update .date, .update .date a { display: inline-block; color: var(--yellow); }
.update .date a:hover { color: var(--l-green); }

.update .tag-area {
	display: flex; flex-wrap: wrap;
	gap: .25em;
	a {
		color: var(--pink);
		&:hover { color: var(--yellow); }
	}
}

.update .details { padding-left: 2em; margin-bottom: 3em; }

.update .summary { color: var(--l-green); }

footer { margin: 0 1em .5em 1em; }

/* next/prev page button area */
#pagination {
	display: flex;
	justify-content: space-between;
	/* actual buttons */
	a, button {
		color: var(--white);
		background: var(--purple);
		padding: .2em .5em .4em .5em;
		border-radius: .5em;
		&:hover, &:focus-visible { background-color: var(--pink); }
	}
}
/* jump to pagination button for keyboard/screenreader nav */
.skip-to-content {
	color: var(--d-purple);
	background: var(--yellow);
	border: 2px var(--purple) solid;
	border-top: none;
	padding: .2em .5em .4em .5em;
	border-radius: 0 0 .5em .5em;
}

/* when page is in iframe */
.iframe {
	/* individual update styling */
	.update:before { margin-left: 0; }
	.update {
		.tag-area { display: none; }
		.details { display: none; }
		.summary { padding-left: 2em; color: var(--l-blue); }
	}
	/* footer next/previous page buttons */
	.skip-to-content, #pagination { display: none; }
}