/*
 * Common style sheet
 */

* {
	box-sizing: border-box;
}

html {
	background-color: #f8f8f8;	
}

body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	margin: 0;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.375;
	color: #222222;
	background-color: #f8f8f8;	
}

h1 {
	font-size: 2em;
}
h2 {
	font-size: 1.75em;
}
h3 {
	font-size: 1.5em;
}
h4 {
	font-size: 1.25em;
}
h5, h6 {
	font-size: 1em;
}

/* >= 480x480 */
@media screen and (min-width: 30rem) and (min-height: 30rem) {
	
}
@media screen and (min-width: 40rem) {
	body {
		flex-direction: row;
	}
	.main {
		max-height: 100vh;
		min-height: 100vh;
		overflow-x: hidden;
		overflow-y: auto;
	}
}
/* >= 640x480 */
@media screen and (min-width: 40rem) and (min-height: 30rem) {
	h1 {
		font-size: 2.5em;
	}
	h2 {
		font-size: 2em;
	}
	h3 {
		font-size: 1.5em;
	}
	h4 {
		font-size: 1.25em;
	}
	h5, h6 {
		font-size: 1em;
	}
}
/* >= 960x640 */
@media only screen and (min-width: 60rem) and (min-height: 40rem) {

}

body.dark-mode,
body.dark-mode > * {
	scrollbar-color: dark;
}
body.dark-mode::-webkit-scrollbar,
body.dark-mode > *::-webkit-scrollbar {
	width: .8rem;
}
body.dark-mode::-webkit-scrollbar-track,
body.dark-mode > *::-webkit-scrollbar-track {
	background-color: rgba(0,0,0,.25);
}
body.dark-mode::-webkit-scrollbar-thumb,
body.dark-mode > *::-webkit-scrollbar-thumb {
	border: 1px solid rgba(0,0,0,.5);
	background-color: rgba(255,255,255,.15);
}

body.light-mode,
body.light-mode > * {
	scrollbar-color: light;
}
body.light-mode::-webkit-scrollbar-track,
body.light-mode > *::-webkit-scrollbar-track {
	background-color: rgba(0,0,0,.2);
}
body.light-mode::-webkit-scrollbar-thumb,
body.light-mode > *::-webkit-scrollbar-thumb {
	border: 1px solid rgba(0,0,0,.25);
	background-color: rgba(255,255,255,.6);
}

.jalbumWidgetbar body {
	margin-bottom: 20px;
}
a {
	outline: 0;
	text-underline-offset: 4px;
	text-decoration-color: #0099cc;
}

b, strong {
	font-weight: 600;
}

h1, h2 {
	font-weight: 300;
}

img {
	border: none;
	display: inline-block;
	max-width: 100%;
	height: auto;
}
.noborder {
	border: none;
}

.main {
	display: flex;
	flex-direction: column;
	flex: 1;
	justify-content: stretch;
	align-items: center;
	color: #222222;
	text-align: center;
	background-color: #f8f8f8;
}

.main a {
	color: #222222;
}

.btn {
	padding: 6px;
	transition: color 500ms ease, background-color 500ms ease;
	border-radius: 3px;
}
.btn:hover {
	color: #ffffff;
	background-color: #0099cc;
}
.btn svg,
.btn img {
	vertical-align: middle;
	height:  24px;
	width:  24px;
}
.btn.disabled svg,
.btn.disabled img {
	opacity: 0.2;
	cursor: not-allowed;
}
.btn svg path,
.btn svg rect,
.btn svg polygon,
.btn svg circle {
	fill: #222222;
	transition: fill 500ms ease;
}
.btn:hover svg path,
.btn:hover svg rect,
.btn:hover svg polygon,
.btn:hover svg circle {
	fill: #ffffff !important;
}
.folder-tree .btn svg path,
.folder-tree .btn svg rect,
.folder-tree .btn svg polygon,
.folder-tree .btn svg circle {
	fill: #222222;
}

header {
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
	gap: 15px;
	padding: 0 15px;
	margin: 15px 0;
	max-width: 100%;
	width: 3120px;
}

header h1,
header h2 {
	margin: 5px 0;
}

header p {
	margin: 0;
}

.buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 100%;
	padding: 0 5px;
	overflow: hidden;
}

/******************************************* Folder tree */

.folder-tree {
	display: flex;
	flex-direction: row;
	width: 100%;
	gap: 10px;
	justify-content: flex-start;
    align-items: flex-start;	
    padding: 15px;
	text-align: left;
	color: #222222;
	background-color: #f8f8f8;
}
.folder-tree > .menu > a,
.folder-tree > .menu > span,
.folder-tree > .menu > .menu > li > a,
.folder-tree > .menu > .menu > li > span {
	font-size: 1.125em;
}
.folder-tree .topnav-toggle {
	display: inline-block;
}
.folder-tree .menu.topnav {
	display: none;
}
.folder-tree.open .menu.topnav {
	display: block;
}
.folder-tree a,
.folder-tree span {
	display: inline-block;
	padding: 5px;
	color: #222222;
	transition: background-color 500ms ease;
}
.folder-tree a {
	text-decoration: none;
}
.folder-tree .home {
	display: block;
}
.folder-tree .home > img,
.folder-tree .home > svg {
	margin-right: 5px;
	vertical-align: -2px;
	width: 18px;
	height: 18px;
}
.folder-tree .home > svg path {
	fill: #222222;
}
.folder-tree .home:hover > svg path {
	fill: #ffffff;
}
.folder-tree a > span {
	width: 24px;
	height: 24px;
	border-radius: 12px;
	background-size: cover;
	vertical-align: -6px;
	margin: 0 8px 0 0;
}
.folder-tree a:hover {
	color: #ffffff;
	background-color: #0099cc;
}
.folder-tree a.toggle {
	position: absolute;
	right: 0;
	top: 5px;
	padding: 5px;
}
.folder-tree span.actual {
	outline: 1px solid rgba(34,34,34,0.25);
}
.folder-tree .menu {
	display: block;
	list-style-type: none;
	position: relative;
	padding: 0;
	margin: 0;
}
.folder-tree .menu li {
	position: relative;
	padding: 0 0 0 10px;
	margin-left: 10px;
	vertical-align: middle;
	white-space: nowrap;
	max-width: 100%;
	text-overflow: ellipsis;
}
.folder-tree.collapsible .collbtn {
	position: absolute;
	left: 0;
	top: 16px;
	transform: translate(-50%,-50%) rotate(0);
	transition: transform 500ms;
	content: '';
	font-size: 9px;
	color: #222222;
}
.folder-tree.collapsible .collapsed > .collbtn {
	transform: translate(-50%,-50%) rotate(-90deg);
}
.folder-tree.collapsible .collapsed > ul {
	display: none;
}
.folder-tree.plain li:before {
	content: '';
	position: absolute;
	left: 0;
	top: 15px;
	width: 10px;
	height: 1px;
	background-color: rgba(34,34,34,0.25);
}
.folder-tree.plain li::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 100%;
	background-color: rgba(34,34,34,0.25);
}
.folder-tree.plain li:last-child::after {
	height: 15px;
}

@media screen and (min-width: 40rem) {
	.folder-tree {
		flex-direction: column;
		width: auto;
		max-width: 40vw;
		max-height: 100vh;
		overflow-x: hidden;
		overflow-y: auto;
	}
	.folder-tree .topnav-toggle {
		display: none;
	}
	.folder-tree .menu.topnav {
		display: block;
	}
}

/******************************************* Folder section */

.folders {
	display: flex;
	flex-flow: row wrap;
	width: 100%;
	justify-content: center;
	align-content: flex-start;
	align-items: stretch;
	padding: 20px;
	color: #222222;
	background-color: #f8f8f8;
}
.folders a {
	text-decoration: none;
	color: #222222;
}
.folders .thumb {
	margin: 8px;
	padding: 0px;
	border: 0px solid #222222;
}
.folders .caption {
	font-size: 1.25em;
}

/******************************************* Thumbnails */

.thumbnails {
	display: flex;
	flex-flow: row wrap;
	width: 100%;
	flex: 1;
	padding: 20px;
	max-width: 3120px;
	justify-content: center;
	align-content: flex-start;
	align-items: stretch;
}
.thumbnails .thumb {
	display: flex;
	flex-direction: column;
	margin: 8px;
	padding: 0px;
	border: 0px solid #222222;
}
.thumbnails .thumb.folder {
	position: relative;
}
.thumbnails.mixed > .thumb:not(.folder) {
	justify-content: flex-start;
}
.thumbnails .thumb > a {
	display: flex;
	justify-content: center;
	position: relative;
	overflow: hidden;
}
.thumbnails.free-shape > .thumb:not(.folder) > a {
	width: 600px;
	height: 200px;
}
.thumbnails > .thumb picture {
	width: 100%;
}
.thumbnails > .thumb img {
	display: block;
	object-fit: contain;
}
.thumbnails.fixed-shape > .thumb img,
.thumbnails.justified > .thumb img {
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
}

.thumbnails.free-shape:not(.justified) > .thumb:not(.folder).no-caption > a {
	flex: 1;
	align-items: center;
}
.thumbnails.free-shape:not(.justified) > .thumb:not(.folder).has-caption > a {
	flex: none;
	align-items: flex-end;
}
.thumbnails.fixed-shape .caption {
	max-width: 600px;
}
.thumbnails.fixed-shape .thumb a {
	width: 600px;
	height: 600px;
}
.thumbnails.mixed > .folder > .info {
	position: absolute;
	right: 0px;
	top: 0px;
	padding: 10px;
	font-size: 0.75em;
	z-index: 1;
	color: #eee;
	background-color: rgba(0,0,0,.7);
}
.thumbnails.mixed > .folder > .info > span {
	display: block;
}
.thumbnails.mixed > .folder > .info::before {
	display: block;
	content: '';
	width: 100%;
	height: 32px;
	background: url(folder.svg) center top no-repeat;
	background-size: contain;
}

.thumbnails .caption {
	max-width: 100%;
	overflow-x: hidden;
	text-overflow: ellipsis;
	padding: 5px;
}
.thumbnails > .thumb:not(.folder) .caption {
	font-size: 0.875em;
}

/******************************************* Footer */

footer {
	margin-top: auto;
}

.creditlink {
	font-size: 0.75em;
	padding: 10px 15px;
}

/******************************************* Customized lightbox elements */

.pswp .modal {
	position: absolute;
	max-width: 80vw;
	max-height: 80vh;
    overflow: auto;
	color: #eee;
	background-color: #111111;
}
.map {
	width: 600px;
	height: 450px;
	z-index: 999;
}
.photodata {
	z-index: 998;
}
.photodata dl {
	margin: 0.5rem;
	display: grid;
	grid-template-columns: max-content 1fr;
	grid-gap: 0.5rem;
	font-size: 0.875rem;
}
.photodata dt {
	padding: .125rem;
	color: #999;
	font-weight: 600;
}
.photodata dd {
	padding: .125rem;
	color: #eee;
}
.pswp__counter {
	margin: 0;
	min-width: 50px;
	height: 60px;
	padding: 20px 15px;
	text-align: center;
	line-height: 20px;
	font-size: 1rem;
	white-space: nowrap;
	background-color: rgba(0,0,0,.25);
}
.pswp__button {
	background-color: rgba(0,0,0,.25);
}
.pswp__button:hover {
	background-color: rgba(0,0,0,.75);
}
.pswp__button--close {
	margin-right: 0;
}
.pswp__button--arrow {
	display: none;
	width: 60px;
	background-color: transparent;
	transition: background-color 500ms;
}
.pswp__button--arrow:hover {
	background-color: rgba(0,0,0,.25);
}
.pswp__button--arrow--prev .pswp__icn {
	left: 0;
}
.pswp__button--arrow--next .pswp__icn {
	right: 0;
}
.pswp__video {
	position: absolute;
}
.pswp__video video {
	max-width: 100%;
	max-height: 100%;
}

@media screen and (min-width: 40rem) {
	.pswp__button--arrow {
		display: block;
	}
}
