/* 2026-06-24 v1.1
 * - Fixed image overlay sizing and centering for current overlay markup
 * - Restored contain fitting with viewport padding
 * - Restored closing image overlays by clicking the opened image
 */

.overlay-close-button {
	background-color: var(--colororange);
	min-width: 50px;
	min-height: 50px;
	padding: 6px;
	line-height: 20px;
	display: flex;
	position: absolute;
	right: 1px;
	top: 1px;
	text-align: center;
	color: #FFF;
	font-size: 16px;
	box-shadow:inset 0px 0.0001px 0px 0.0001px var(--colororange);
	transition: 0.2s ease all;
}
.overlay-close-button::after {
    display: inline-block;
    text-align: center;
    content: 'T';
    margin: auto;
    font-family: 'FontAwesome';
    content: "\f00d";
     font-weight: normal;
  font-style: normal;
    font-size: 30px;
}
.overlay-close-button:hover {
	transition: 0.1s ease all;
	box-shadow:inset 0px -50px 0px 0.0001px var(--colororange);
}
.overlay-close-button:active {
	transition: 0.05s ease all;
	box-shadow:inset 0px -50px 0px 0.0001px #333;
}

.overlay {
	padding: 30px;
	padding-top:30px;
	width: 100%;
	
	overflow: hidden;
	background:linear-gradient(to bottom, rgba(6,4,4,0.8), #060404 90vh);
	
	animation: overlayshow;
	animation-duration: 0.2s;
	animation-delay:0s; 
	animation-iteration-count: 1;
}
.overlay[overlay-type="image"] .overlay-inner,
.overlay[overlay-type="image"] .overlay-content,
.overlay-image,
.overlay-image-box {
	width: 100%;
	height: 100%;
}
.overlay[overlay-type="image"] .overlay-content,
.overlay-image,
.overlay-image-box {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.overlay[overlay-type="image"] .overlay-image,
.overlay[overlay-type="image"] .overlay-image img,
.overlay[overlay-type="image"] .overlay-image-box,
.overlay[overlay-type="image"] .overlay-image-box img {
	pointer-events: none;
}
.overlay-image, .overlay-image img,
.overlay-image-box, .overlay-image-box img { 
	min-width: 10px!important;
	max-width: 100%!important;
}
.overlay-image img,
.overlay-image-box img { 
	transform: scale(0.9,0.9);
	opacity: 0; 
	
	animation: overlayimageshow;
	animation-duration: 0.3s;
	animation-delay:0s; 
	animation-iteration-count: 1;
	
	border:5px solid #fff;
	box-shadow:0px 0px 0px 1px #C2C6C7;
	box-sizing: border-box;
	display: block;
	width: auto;
	height: auto;
	max-width: calc(100vw - 60px)!important;
	max-height: calc(100vh - 60px)!important;
	object-fit: contain;
	cursor: zoom-out;
	
}
.overlay-shown .overlay-image img,
.overlay-shown .overlay-image-box img {
	transform: scale(1,1);
	transition: 0.1s ease all;
	transition-delay: 0.1s;
	opacity: 1; 
	
}
@keyframes overlayshow {
	0%   { opacity: 0;  }
	100% { opacity: 1; }
}

@keyframes overlayimageshow {
	0%   { opacity: 0; transform: scale(0.9,0.9); }
	50%   { opacity: 0; transform: scale(0.9,0.9); }
	100% { opacity: 1;  transform: scale(1,1); }
}

.overlay-image iframe {
    background-color: #333;
    border:5px solid #fff;
	box-shadow:0px 0px 0px 1px #C2C6C7;
}

.overlay-prev-button, .overlay-next-button {
   
    position: fixed;
    display: none;
    top: 50%;
    width: 50px;
    height: 50px;
    padding: 10px;
    transform: scale(0.8,0.8);
}
body[overlay-has-prev="1"] .overlay-prev-button {
    display: block;
}
body[overlay-has-next="1"] .overlay-next-button {
    display: block;
}
.overlay-next-button {
     right: 35px;  
  
}
.overlay-prev-button {
     left:35px;  
      transform: scale(-0.8,0.8);
}
.overlay-prev-button::after, .overlay-next-button::after,
.overlay-prev-button::before, .overlay-next-button::before {
    content: ' ';
    display: block;
   
    height: 5px;
    width: 30px;
    background-color: #fff;
    top: 50%;
    
    transform-origin: top right;
}

.overlay-prev-button:hover::after, .overlay-next-button:hover::after,
.overlay-prev-button:hover::before, .overlay-next-button:hover::before {
     background-color:var(--colororange);   
}
.overlay-prev-button::before, .overlay-next-button::before {
    transform: rotate(45deg);
    margin-top: 15px;
}
.overlay-prev-button::after, .overlay-next-button::after {
    transform: rotate(-45deg);
    transform-origin: bottom right;
    margin-top: -8px;
}
.overlay-prev-button::after {
 
}
.overlay-prev-button::before, .overlay-next-button::before {
 
}
