.modal {
	--modal-pad: 1.625em;
}

.modal__overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 20;
}

.modal__container {
	max-width: 948px;
	max-height: 100svh;
	width: 100%;
	overflow-y: auto;
/*	background-color: var(--color-mid-green);*/
	color: white;
	position: relative;
}

.modal__header {
	margin: 0 var(--modal-pad) 1em;
	padding: calc(var(--modal-pad)/2) 0;
	border-bottom: var(--border-line);
}

.modal__header--invisible {
	margin: 0;
	padding: var(--modal-pad) var(--modal-pad) 0;
	border-bottom: none;
}

.modal__close {
	border: 0;
	border-radius: 50%;
	background: white;
	width: 1.5625rem;
	aspect-ratio: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	right: 1rem;
	top: 1rem;
}

.modal__close:before {
	content: "\2715";
	display: block;
	font-size: 1em;
	transform: translateY(1px);
}

.modal__close:focus {
	outline: none;
}

.modal__content {
	padding: calc(var(--modal-pad)/2) var(--modal-pad) var(--modal-pad);
}

@keyframes mmfadeIn {
    from { opacity: 0; }
      to { opacity: 1; }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
      to { opacity: 0; }
}

@keyframes mmslideIn {
  from { transform: translateY(15%); }
    to { transform: translateY(0); }
}

@keyframes mmslideOut {
    from { transform: translateY(0); }
    to { transform: translateY(-10%); }
}

.micromodal-slide {
	display: none;
}

.micromodal-slide.is-open {
	display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
	animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
	animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
	animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
	animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container, .micromodal-slide .modal__overlay {
	will-change: transform;
}

#modal-newsletter .modal__header {
	background: url(../../images/modal/modal--newsletter-kbs.webp) no-repeat right bottom / auto 90%;
}

#modal-newsletter .modal__header .heading {
	max-width: 50%;
	font-size: 1.5em;
}
	
#modal-click2buy .button {
	font-size: smaller;
}
	
#modal-click2buy .modal__content > div {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	align-items: center;
}
	
#modal-click2buy .modal__content > div > .lead {
	align-self: flex-start;
}
	
#modal-click2buy .modal__content img {
	width: 90%;
}

@media screen and (min-width: 768px) {
	/* wider layout styles here */
	.modal {
		--modal-pad: 3.2em;
	}
	
	#modal-click2buy .modal__content {
		display: flex;
	}
	
	#modal-click2buy .modal__content > * {
		flex: 1 1 0;
		width: 50%;
	}
	
	#modal-click2buy .modal__content > div {
		gap: 2em;
		align-items: flex-start;
	}
	
	#modal-click2buy .modal__content img {
		width: 100%;
	}

	#modal-newsletter .modal__header {
		background-position: 75% bottom;
	}

	#modal-newsletter .modal__header .heading {
		font-size: 3.2em;
	}

	#modal-newsletter .modal__content {
		display: flex;
		gap: 2em;
	}

	#modal-newsletter .modal__content > * {
		width: 50%;
	}

}
