.cgal {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	box-sizing: border-box;
	padding: 4em;
	display: flex;
	justify-content: center;
	align-items: center;
	animation: 0.33s ease 0s forwards fin;
	opacity: 0;
	z-index: 200;
	background: transparent;
	margin: 0;
	max-width: unset;
	max-height: unset;
	border: none;
	/* display: none; */
	
	
	

	& *{
		box-sizing: border-box;
	}

	&::backdrop{
		background-color: #fff8;
		backdrop-filter: blur(4px);
	}

	&.out{
		animation: 0.2s ease 0s forwards fout;
	}

	& .stage,
	& .wrapper {
		width: 100%;
		height: 100%;
		display:flex;
		justify-content: center;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 0.5em;
	}
	& .stage{

		& iframe {
			width: 100%;
			height: 100%;
			border: none;
			border-radius: 5px;
		}
		
		& .imgwrapper {
			/* border: 2px solid red; */
			max-height: 100%;
			max-width: 100%;
			border-radius: 5px;
			overflow: hidden;
		}
		& .title {
			padding: 0.25em; 
			text-align: center; 
			background-color: white;
			border-radius: 0.5em; 
			font-size:smaller; 
		}
		
		& .imgwrapper img{
			flex-grow: 0;
			width: auto;
			max-height: 100%;
			height:  auto;
			max-height: 100%;
			max-width:  100%;
			object-fit: contain;
		}
		
		& video {
			max-height:100%;
			max-width: 100%;
			border-radius: 5px;
		}	
	}

	
	& .next, 
	& .prev {
		position: absolute;
		right: 0;
		width: 3em;
		top: 5em;
		height: calc(100% - 10em);
		display: flex;
		justify-content: center;
		align-items: center;
		cursor: pointer;
		transition: all 0.2s ease;
		opacity: 1;
		overflow: hidden;
		border:  none;
		background-color: white; 

		&.dis{
			display: none; 
		}
		
		&:hover, &:focus-within{}

	}
	& .prev {
		border-bottom-right-radius: 1em; 
		border-top-right-radius: 1em; 	
		right: auto;
		left: 0;
	}
	& .next {
		border-bottom-left-radius: 1em; 
		border-top-left-radius: 1em; 
	}

	& .preview{
		position: absolute; 
		width: 0px; 
		height: 0px; 
		opacity: 0; 
		left: 0;
		top: 0; 
		z-index: -10;
	}

}


@keyframes fin {
	100% {
		opacity: 1;
	}
}

@keyframes fout {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

.cgal .next:after, 
.cgal .prev:after {
	content: "";
	border-left: 1em solid white;
	border-top: 1em solid transparent;
	border-bottom: 1em solid transparent;
	z-index: 1;
}

.cgal .prev:after {
	border-right: 1em solid white;
	border-left: none;
}

.cgal .next:before, 
.cgal .prev:before {
	content: "";
	width: 100%;
	height: 100%;
	position: absolute;
	background-color: var(--c-red);
	opacity: 1;
	transition: var(--t-std);
}

.cgal .next:hover:before, 
.cgal .next:focus-within:before, 
.cgal .prev:hover:before, 
.cgal .prev:focus-within:before {
	background-color: var(--c-blue);
}


.cgal .close {
	background-color: var(--c-red);
	position: absolute;
	top: 0;
	right: 0;
	width: 4em;
	height: 4em;
	cursor: pointer;
	transition: all 0.2s ease;
	border-bottom-left-radius: 1em;
	border: none;
}

.cgal .close:hover,
.cgal .close:focus-within {
	background-color:var(--c-blue)
}

.cgal .close:hover:after {
	transform: translateX(50%) translateY(-50%) rotateZ(135deg);
}

.cgal .close:hover:before {
	transform: translateX(50%) translateY(-50%) rotateZ(45deg);
}

.cgal .close:after, .cgal .close:before {
	content: "";
	background-color: white;
	position: absolute;
	top: 50%;
	right: 50%;
	width: 2em;
	height: 0.25em;
	border-radius: 0.1em;
	transform: translateX(50%) translateY(-50%) rotateZ(45deg);
	transition: all 0.3s ease;
}

.cgal .close:before {
	transform: translateX(50%) translateY(-50%) rotateZ(-45deg);
}

@media(max-width: 62rem){
    .cgal .next, .cgal .prev {
    	opacity: 1;
    }
    .cgal {
		padding: 1em;
    }
	.cgal .close {
		width: 3em;
		height: 3em;
	}
}
@media(max-width: 62rem) AND (orientation: portrait){
    .cgal .next, .cgal .prev {
    	opacity: 1;
    }
    .cgal .next,
    .cgal .prev {
        height: 3em; 
        left: calc(50% + 1em); 
        border-radius: 0.5em; 
        bottom: 1em;
        top: auto;
    }
    .cgal .prev {
        left: auto; 
        right: calc(50% + 1em); 
    }

}