/* defines default "fallback" styles */
/* 
:root {
	--modal-shadow: 3px 4px 13px rgba(0, 0, 0, 0.4);
}
 */

/* Modal content */
.modal-content {
	font-size:16px;            
	line-height: 1.4;         
	border: none;
	border-radius: 0px;
	display: block !important; /* break out of flex/grid context */
	overflow-y: auto;          /* allow vertical scrolling if needed */
	max-height: 75vh;          /* prevents it from extending beyond view */
}

/* Modal box */
#modal-box {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%); /* center the box */
	background: #fff;
	z-index: 10100;
	max-width: 95%;
	width: var(--modal-width);
	padding: var(--modal-padding);
	border-radius: var(--modal-radius);
	box-shadow: 3px 4px 13px rgba(0, 0, 0, 0.4);
	overflow-y: auto;   /* scroll vertically if content is too tall */
	overflow-x: hidden; /* prevent horizontal scroll */
	/* overflow: visible; */
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, transform 0.3s ease;
	overflow: visible;
	height:auto; /* added to accommodate pardot forms */
}

/* Default style */
#modal-box[data-modal-style="default"] {
	--modal-padding: 30px;
	--modal-radius: 16px;
	--modal-width: 750px;
}

/* Ceros style */
#modal-box[data-modal-style="ceros"] {
	--modal-width: 1100px;
	--modal-padding: 0px;
	--modal-radius: 0px;
	/* transform: translate(-50%, -50%); */ /* remove scale */
	overflow-y: auto;  /* scrollbar only if truly required */
	overflow-x: hidden; /* prevents horizontal scroll */
	max-height: 85vh;
}

#modal-box[data-modal-style="ceros"] .modal-content {
	overflow: hidden;    /* no internal scroll inside content */
	max-height: none;    /* let iframe content define height */
	padding: 0 !important;
}

/* Video style */
#modal-box[data-modal-style="video"] {
	--modal-padding: 0.6vw;
	--modal-width: 1100px;
	--modal-radius: 0px;
}

@media only screen and (max-width: 600px) {

	#modal-box .modal-close {
	-webkit-tap-highlight-color: transparent;
	transform: translateZ(0);
	will-change: transform;
	}
	
	#modal-box[data-modal-style="video"]   { --modal-padding: 0px; max-width:97% }
	#modal-box[data-modal-style="default"] { --modal-padding: 15px; }
}

/* Show states (fade & zoom) */
#modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

#modal-box.show {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%) scale(1); /* removed previous scale adjustments */
}


/* Close button */
.modal-close {
	position: absolute;
	top: -3px;
	right: 10px;
	padding: 8px;
	line-height: 1;
	font-size: 38px;
	letter-spacing: 0;
	font-weight: 300;
	color: #6f6f6f;
	cursor: pointer;
	transition: 0.3s ease;
	z-index: 1;
	background: transparent;
	border: none;
}

.modal-close:hover {
	color: #dd0000;
	/* background-color: rgba(128, 128, 128, 0.5); */
	transition: 0.5 ease;
}

.modal-video {
	aspect-ratio: 16 / 9;
	height: auto; 
	width: 100%;
	vertical-align: middle;
	box-sizing: unset; /* fixes Vimeo sizing in mobile */
}

/* Optional scrollbar styling */
#modal-box::-webkit-scrollbar {
	width: 10px;
}

#modal-box::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 0px;
}

/* Overlay background */
#modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease;
}

#modal-overlay.show {
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px); /* Safari support */
}

