#modal
{
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	animation-name: fadeIn;
	animation-duration: 150ms;
	animation-timing-function: ease;
}

#modal-underlay
{
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

#modal-pane
{
	position: relative;
	width: 92%;
	max-width: 300px;
	max-height: 80%;

	border: solid 1px #999;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
	background-color:white;

	animation-name: zoomIn;
	animation-duration: 150ms;
	animation-timing-function: ease;

	display: flex;
	flex-direction: column;
	border: none;
	box-shadow: none;
	justify-content: space-between;
}

#modal.closing
{
	animation-name: fadeOut;
	animation-duration: 150ms;
	animation-timing-function: ease;
	animation-fill-mode: forwards;
}

#modal.closing #modal-pane
{
	animation-name: zoomOut;
	animation-duration: 150ms;
	animation-timing-function: ease;
	animation-fill-mode: forwards;
}

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

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

@keyframes zoomIn
{
	0% {transform: scale(0.9);}
	100% {transform: scale(1);}
}

@keyframes zoomOut
{
	0% {transform: scale(1);}
	100% {transform: scale(0.9);}
}

#modal-pane button
{
	cursor: pointer;
	display: block;
}

#product-modal-x
{
	position: absolute;
	padding: 0;
	right: 10px;
	top: 10px;
	z-index: 1020;
	height: 25px;
	width: 25px;
}

#modal header
{
	position: sticky;
	z-index: 1010;
	background-color: var(--risalto-beige-light);
	padding: 10px;
	top: 0;
	text-align: center;
	box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3);
}

#modal header strong:last-of-type
{
	color: var(--risalto-red-light);
}

#modal-pane p,
#modal-pane label,
#modal-pane .section-no-customization
{
	margin: 0;
	font-weight: 300;
	line-height: 1.5;
}

#modal-pane ul
{
	font-weight: 300;
	margin: 8px 0;
	padding-left: 30px;
}

#product-modal-content
{
	display: flex;
	flex-direction: column;
	gap: 20px;
}

#modal section
{
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 10px;
}

#modal strong,
.modal-paragraph-title
{
	color: var(--risalto-grey-dark);
	font-weight: 500;
}

.modal-paragraph-title
{
	margin-bottom: 5px;
}

#modal footer
{
	position: sticky;
	z-index: 1010;
	background-color: var(--risalto-beige-light);
	color: #fff;
	padding: 10px;
	bottom: 0;
	box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3);
}

#product-modal-buttons
{
	display: flex;
	justify-content: end;
	gap: 5px;
}


@media (min-width: 450px)
{
	#modal-pane.wide-modal
	{
		max-width: 400px;
	}
}

@media (min-width: 768px)
{
	#modal-pane.wide-modal
	{
		max-width: 500px;
	}
}

@media (min-width: 1200px)
{
	#modal-pane.wide-modal
	{
		max-width: 800px;
		max-height: 90%;
	}
}

