:root {
  --dark: #444444;
  --perma-dark: #444444; /* Should always be "dark" color */
  --darker: #222222;
  --darker-mostly-nontransparent: rgba(34, 34, 34, 0.75);
  --gray: #aaaaaa;
  --light: #f0f0f0;
  --perma-light: #f0f0f0;  /* Should always be "light" color */
  --lighter: #ffffff;

  --h1-font-size: 2em;
  --h2-font-size: 1.5em;
  --h3-font-size: 1.0em;

  --transition-quick: 0.3s;

  --small-spacing: 2px;
  --normal-spacing: 5px;

  --album-size: 320px;
  --album-size-small: 150px;
}

body, html {
	width: 100%;
	max-width: 1290px;
	height: 100%;
	margin: 0 auto;
	margin-top: env(safe-area-inset-top);
	
	font-family: ubuntu, calibri, arial;

  background-color: var(--lighter);
  color: var(--darker);
}

body.noscroll {
	position: fixed;
	overflow: hidden;
	width: 100%;
	height: 100%;
}

button {
	border: 2px solid var(--dark);
	background-color: var(--darker);
	color: var(--lighter);
	padding: 10px;
	font-family: ubuntu, calibri, arial;
	outline: none;
}

button:active {
	background-color: var(--dark);
}

textarea {
  outline: none;
  border: 1px solid var(--light);
}

.h1, h1 {
  font-size: var(--h1-font-size);
  margin-top: calc(var(--h1-font-size) / 2);
  margin-bottom: calc(var(--h1-font-size) / 3);
  font-weight: bold;
}

.h2, h2 {
  font-size: var(--h2-font-size);
  margin-top: calc(var(--h2-font-size) / 2);
  margin-bottom: calc(var(--h2-font-size) / 3);
  font-weight: bold;
}

.h3, h3 {
  font-size: var(--h3-font-size);
  margin-top: calc(var(--h3-font-size) / 2);
  margin-bottom: calc(var(--h3-font-size) / 3);
  font-weight: normal;
}

.h1, h1,
.h2, h2,
.h3, h3 {
  font-family: inherit;
  text-align: center;
  width: 100%;
  line-height: 100%;
}

textarea::placeholder {
  color: var(--gray);
}

.admin {
	width: 35px;
	height: 25px;
	position: fixed;
	right: 10px;
	top: 10px;
	background-image: url("../images/settings.png");
	background-size: 25px;
	background-repeat: no-repeat;
	background-position: center center;
	z-index: 4;
}

#albums .album, #photos label div {
	width: var(--album-size);
	height: var(--album-size);
	margin: 0;
	float: left;

	background-size: 100% 100%;

	padding: 10px;
	text-align: left;
  
  color: var(--perma-light);

	box-sizing: border-box;
}

#main {
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
}

.hidden {
  display: none !important;
}

.title-image { max-height: 200px; }

.site-header {
  display: block;
	font-size: var(--h1-font-size);
	font-weight: bold;
	color: var(--darker);

	text-align: center;

	text-decoration: none;
}

.initially-hidden {
	/* So that it's dimensions are still counted towards placement of elements */
	opacity: 0.01;
}

.opacity1 {
	opacity: 1 !important;
	transition-property: opacity;
  transition-duration: var(--transition-quick);
	-webkit-transform-style: preserve-3d;
}

#photo-view .photo-button, .nav {
	cursor: pointer;
	width: 35px;
	height: 25px;
	background-size: 25px;
	background-repeat: no-repeat;
	background-position: center center;
	position: fixed;
	top: max(10px, env(safe-area-inset-top));
	z-index: 2;
}

#photo-view .photo-button.close-button, .nav {
	background-image: url('../images/close.png');
	left: max(10px, env(safe-area-inset-left));
}

.photos div.video, .photos-manager div.video, #photo-detail .previewimg.video {
	background-size: 100px 100px, 100% 100% !important;
	background-repeat: no-repeat, no-repeat;
	background-position: center center;
}

@media screen and (max-width: 1000px) {
	:root {
		--h1-font-size: 1.5em;
		--h2-font-size: 1.2em;
		--h3-font-size: 0.8em;
	}

  .title-image { max-width: 100%; }
}
