/*
	Title
*/

#widget2, #widget3 {
	display: none;
}

div.unreadwidgets img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

div.productheader {
	margin-left: auto;
	margin-right: auto;

	width: 185px;
	height: 82px;
	background-size: 185px 82px;
	background-image: url(https://cdn.goldenhillsoftware.com/unread/header-small-day.webp);
	margin-top: 41px;
	margin-bottom: 41px;

	margin-left: auto;
	margin-right: auto;
}

div.productheader h1 {
	text-indent: -10000px;
}

@media (min-width: 667px) {
	div.productheader {
		width: 275px;
		height: 122px;
		background-size: 275px 122px;
		margin-top: 90px;
		margin-bottom: 90px;
		background-image: url(https://cdn.goldenhillsoftware.com/unread/header-large-day.webp);
	}
}

@media (prefers-color-scheme: dark) {
	div.productheader {
		background-image: url(https://cdn.goldenhillsoftware.com/unread/header-small-night.webp);
	}
}

@media ((min-width: 667px) and (prefers-color-scheme: dark)) {
	div.productheader {
		background-image: url(https://cdn.goldenhillsoftware.com/unread/header-large-night.webp);
	}
}

/* Screenshot */

img.screenshot {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-top: 41px;
	margin-bottom: 41px;
	padding: 0px;
}

@media (min-width: 667px) {
	img.screenshot {
		margin-top: 90px;
		margin-bottom: 90px;
	}
}

section {
	margin-top: 40px;
	margin-bottom: 40px;
}

section h2 {
	font-size: 1.5em;
	font-style: normal;
	color: #333333;
	margin-bottom: 20px;
}

@media (min-width: 667px) {
	section {
		margin-top: 60px;
		margin-bottom: 60px;
	}
	h2 {
		margin-bottom: 20px;
	}
}

@media (prefers-color-scheme: dark) {
section h2 {
	color: #cccccc;
}
}


div.productpageheaderimage {
	margin-top: 41px;
	margin-bottom: 41px;
}

@media (min-width: 667px) {
	div.productpageheaderimage {
		margin-top: 90px;
		margin-bottom: 90px;
		margin-left: auto;
		margin-right: auto;
	}
}
@media (max-width: 430px) {
div.productpageheaderimage {
	margin-left: -20px;
	margin-right: -20px;
	max-width: calc(100% + 40px) !important;
}
}


p.screenshotgallerylinks {
	text-align: center;
}

p.screenshotgallerylinks span {
white-space:nowrap;
}

div.bodydiv p.screenshotnavline1 {
	margin-top: 41px;
	margin-bottom: 0.5em;
}
div.bodydiv p.screenshotnavline2 {
	margin-bottom: 41px;
}
@media (min-width: 667px) {
div.bodydiv p.screenshotnavline1 {
	margin-top: 60px;
}
div.bodydiv p.screenshotnavline2 {
	margin-bottom: 60px;
}
}

div.bodydiv figure {
	margin-top: 41px;
	margin-bottom: 41px;
}

@media (min-width: 667px) {
div.bodydiv figure {
	margin-top: 60px;
	margin-bottom: 60px;
}
}



/*
	Screenshot overlay
*/
@keyframes fadein {
	from {opacity: 0%;}
	to {opacity: 100%;}
}

@keyframes fadeout {
	from {opacity: 100%;}
	to {opacity: 0%;}
}
	

@keyframes slideleft {
	from {transform: translateX(0px);}
	to {transform: translateX(-100vw);}
}
@keyframes slideright {
	from {transform: translateX(0px);}
	to {transform: translateX(100vw);}
}

#screenshotoverlay {
	display: none;
	position: fixed; /* Sit on top of the page content */
	width: 100%; /* Full width (cover the whole page) */
	height: 100%; /* Full height (cover the whole page) */
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}
#screenshotoverlay.visible {
	display: block;
}
#screenshotoverlay.fadingout {
	display: block;
}

#screenshotoverlay div.background {
	position: fixed;
	width: 100%; /* Full width (cover the whole page) */
	height: 100%; /* Full height (cover the whole page) */
	top: 0;
	left: 0;
	right: 100px;
	bottom: 100px;
	background-color: rgba(0,0,0,0.8);
}

#screenshotoverlay.visible div.background {
	animation-duration: 0.3s;
	animation-name: fadein;
	animation-timing-function: ease-in-out;
}

#screenshotoverlay.fadingout div.background {
	animation-duration: 0.3s;
	animation-name: fadeout;
	animation-timing-function: ease-in-out;
	opacity: 0%;
}

#screenshotoverlay div.figures {
	position: fixed;
	top: 44px;
	bottom: 44px;
	left: 44px;
	right: 44px;
}

#screenshotoverlay div.figures.slidingleft {
	animation-duration: 0.3s;
	animation-name: slideleft;
	animation-timing-function: ease-in-out;
}
#screenshotoverlay div.figures.slidingright {
	animation-duration: 0.3s;
	animation-name: slideright;
	animation-timing-function: ease-in-out;
}

#screenshotoverlay figure {
	position:absolute;
	top: 0px;
	bottom: 0px;
	left: 0px;
	right: 0px;
}
#screenshotoverlay figure.prev {
	transform: translateX(-100vw);
}
#screenshotoverlay figure.next {
	transform: translateX(100vw);
}
#screenshotoverlay figure.current {
	transform: translateX(0vw);
}


#screenshotoverlay figure img {
  	--maxHeight: 0;
  	--maxWidth: 0;
	display: block;
	height: auto;
	width: auto;
	max-width: var(--maxWidth) !important;
	max-height: var(--maxHeight);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

#screenshotoverlay figure figcaption {
	display: block;
	color: #ffffff;
	width: 100%;
	text-align: center;
	position: fixed;
	left: 0px;
	height: 44px;
  	--imageWidth: 0;
  	--imageHeight: 0;
	top: min(calc(((100vw - 88px) * (0.5 * var(--imageHeight) / var(--imageWidth))) + 50%), calc(100%));
	-webkit-user-select: none;
	user-select: none;
	cursor: default;
}
#screenshotoverlay figure figcaption span {
	display: inline-block;
	background: #000000;
	border-radius: 6px;
	margin-top: auto;
	margin-bottom: auto;
	margin-left: auto;
	margin-right: auto;
	padding-left: 8px;
	padding-right: 8px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
    white-space: nowrap;
}

#screenshotoverlay img {
	-webkit-user-select: none;
	user-select: none;
  border-radius: 6px;
  object-fit: cover;
}
#screenshotoverlay button {
	position: fixed;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	margin: 0px;
	padding: 0px;
	z-index: 2;
}
#screenshotoverlay button span {
	text-indent: -10000px;
	display: block;
}
#screenshotoverlay button.close {
	top: 0px;
	left: env(safe-area-inset-left);
}
#screenshotoverlay button.prev {
	position: absolute;
	top: 50%;
	left: env(safe-area-inset-left);
	margin-top: -22px;
}
#screenshotoverlay button.next {
	position: absolute;
	top: 50%;
	right: env(safe-area-inset-right);
	margin-top: -22px;
}
#screenshotoverlay button {
	color: #ffffff;
}
#screenshotoverlay button:active {
	color: #dddddd;
}
#screenshotoverlay button[disabled] {
	color: #666666;
	cursor: default;
}
#screenshotoverlay button:hover rect.showhover {
	color: rgba(102,102,102,1.0);
}
#screenshotoverlay rect.showhover, #screenshotoverlay button[disabled] rect.showhover {
	color: rgba(0,0,0,1.0);
}
