/*
	CSS DOCUMENT
	PROPERTY OF DULCET GAMES INC.

	March 7, 2018
*/


/* ! The standard popup form */
/* (background chooser, character chooser, replay chooser, etc.) */

.cm-chooser-container.visible {display: block}
.cm-chooser-container {display: none}
.cm-chooser-container > div
{
    display: block;
    flex-direction: column;
    position: fixed;
    
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;

    max-width: 80vw;
    max-height: 80vh;
    width: fit-content;
	width: -moz-fit-content;
	
    height: fit-content;
    height: -moz-fit-content;

    background: var(--sc-background);
    border-radius: 0.6vw;
}

/* Header & footer*/
.cm-chooser-container > div > *:first-child {border-radius: 0.6vw 0.6vw 0 0}
.cm-chooser-container > div > *:last-child {border-radius: 0 0 0.6vw 0.6vw}

.cm-chooser-container.small > div {width: 40vw}


#popupContainer.vertical,
#popupContainer.horizontal
{
	padding: 0 !important;
	background: var(--sc-primary-background) !important;
	max-width: none;
	border-radius: 2vw;
}
#popupContainer.horizontal {
	max-height: 80vh;
	height: 60vw;
	width: fit-content;
	width: -moz-fit-content;
	
}
#popupContainer.vertical {
	max-width: 80vw;
	width: 100vh;
	height: fit-content;
	height: -moz-fit-content;
}

#popupContainer
{
    position: absolute;
	
	width: fit-content;
	width: -moz-fit-content;
	height: fit-content;
	height: -moz-fit-content;
	max-width: 50vw;
	

    top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin: auto;

    box-shadow: var(--std-box-shadow);
    border-radius: 0.6vw;
    padding: 1.2vw;

	background-color: var(--sc-background);
	z-index: 10;
}

	/* #popupContainer > h1 {}	 */
	#popupContainer > div {
		margin: 0.6vw auto;
	}
	.inline-gift-image,
	#popupContainer > .popup--body > img {height: 2vw; width: 2vw; display: inline; margin-bottom: -0.4vw;}
	#popupContainer > .popup--body {
		text-align: center;
		font-size: 1.6vw;
		line-height: 2vw;
	}
	.popup--buttons-line {
		display: flex;
		height: fit-content;
		height: -moz-fit-content;
		margin: 0!important;
		border-radius: 0 0 0.6vw 0.6vw;
	}
	.popup--buttons-line > * {margin: 0 0.4vw}
	.popup--buttons-line > *:first-child {margin-left: auto}
	.popup--buttons-line > *:last-child {margin-right: auto}


.horizontal-popup-image
{
	width: auto;
	height: calc(100% - 4rem);/* -4rem for the bottom line*/
	margin: 0;
	position: relative;
	border-radius: 0.6vw 0.6vw 0 0;
}


#popupHandler.visible {display: block}
#popupHandler:empty {display: none;}
#popupHandler
{
	display: none;
	position: fixed;
	
	width: 100%;
	height: 100%;

	top: 0px;
	left: 0px;
	
	box-shadow: var(--std-box-shadow);
	background-color: rgba(0, 0, 0, 0.7);/* same as opacity: 0.7; */

	z-index: 10;
}
#popupHandler > div {
	animation-name: zoomIn;
	animation-duration: 0.3s;
	-webkit-animation-name: zoomIn;
	-webkit-animation-duration: 0.3s;
}

.popupHandlers--non-escapable.visible,
.popupHandlers.visible {display: block}
.popupHandlers--non-escapable,
.popupHandlers
{
	display: none;
	position: fixed !important;

	width: 100vw !important;
	height: 100vh !important;
	
	left: 0 !important;
	top: 0 !important;

	z-index: 5 !important; /* the header is 4 */
	background-color: rgba(0, 0, 0, 0.7) !important;/* same as opacity: 0.7; */
}

.popupHandlers--non-escapable > div,
.popupHandlers > div
{
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin: auto;

	width: fit-content;
	height: -moz-fit-content;

	width: fit-content;
	height: -moz-fit-content;

	border-radius: 0.6vw;

	animation-name: zoomIn;
	animation-duration: 0.3s;
	-webkit-animation-name: zoomIn;
	-webkit-animation-duration: 0.3s;
	/* transform: opacity 0.3s ease-out; */
}

.popupHandlers.square.medium > div {width: 37vw; height: 37vw}

.popupHandlers.horizontal.small > div {width: 30vw; height: 22vw}
.popupHandlers.horizontal.medium > div {width: 37vw; height: 37vw}
.popupHandlers.horizontal.large > div {width: 90vw;}

.popupHandlers.vertical.small > div {}
.popupHandlers.vertical.medium > div {}
.popupHandlers.vertical.large > div {}

@media only screen
and (max-width: 900px)/* and (orientation: portrait)*/
{
	.popupHandlers > div {width: 100% !important; height: 100% !important;}
}


#resetProgressDiv-progressBar-logo
{
	position: absolute;
	z-index: 2 !important;
	box-sizing: border-box;
	left: 15px;
	transform: translateY(-40%);

	width: 80px;
	height: 80px;
}

#resetProgressDiv-progressBar
{
	box-sizing: border-box;

	color: var(--sc-primary-foreground);
	background-color: var(--sc-primary-background);
	text-align: right;
	font-weight: 400;
	
	margin-left: 20px;
	margin-top: 0.6vw;
	padding: 5px;

	min-width: 80px;
	
	border-top-right-radius: 40px;/* because the height is 80px, this is the same as 50%, only better because 50% is also relative to the width */
	border-bottom-right-radius: 40px;
	
	z-index: 1;
}

#resetProgressDiv-popupHandler
{
	display: none;
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: 100;
	background-color: rgba(0, 0, 0, 0.7);/* same as opacity: 0.7; */
}

/* GIFTS */

@media only screen and (max-width: 900px)
{
	#popupHandler
	{
		font-size: 1rem;
	}

	#popupContainer
	{
		max-width: calc(100% - 20px);
		max-height: calc(100% - 20px);
	}

	#popupHandler > #popupContainer > .button {
        margin-top: var(--half-button-font-size);       
	}
}

@media only screen and (max-width: 900px) and (orientation: portrait)
{
	.horizontal-popup-image
	{
		height: auto;
		width: 100%;
	}
}
