/* AmplifyPOP — frontend overlay styles */

.pp-body-lock {
	overflow: hidden;
}

#pp-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: pp-fade-in 0.25s ease;
}

#pp-backdrop.pp-windowed {
	background: rgba( 0, 0, 0, 0.6 );
}

#pp-backdrop.pp-fullscreen {
	background: #000;
}

/* Windowed modal shell */
#pp-modal {
	position: relative;
	width: 90vw;
	max-width: 860px;
	height: 80vh;
	max-height: 640px;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.4 );
	display: flex;
	flex-direction: column;
}

/* iframe fills its container */
#pp-frame {
	width: 100%;
	height: 100%;
	border: none;
	flex: 1;
}

/* Close button — shared between modes */
#pp-close {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 10;
	width: 36px;
	height: 36px;
	padding: 0;
	background: rgba( 0, 0, 0, 0.55 );
	color: #fff;
	border: 2px solid rgba( 255, 255, 255, 0.7 );
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

#pp-close:hover,
#pp-close:focus {
	background: rgba( 0, 0, 0, 0.8 );
	outline: none;
}

/* Full-screen: iframe fills the whole backdrop */
#pp-backdrop.pp-fullscreen #pp-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Fallback card — shown when no HTML file is set */
#pp-fallback {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 32px;
	background: #fff;
}

#pp-backdrop.pp-fullscreen #pp-fallback {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.85 );
}

#pp-fallback-btn {
	display: inline-block;
	padding: 16px 36px;
	background: #1a73e8;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	font-family: inherit;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.15s, transform 0.1s;
	white-space: nowrap;
}

#pp-fallback-btn:hover,
#pp-fallback-btn:focus {
	background: #1558b0;
	transform: translateY( -1px );
	outline: none;
}

/* In full-screen mode lighten the button text contrast is fine on dark bg */
#pp-backdrop.pp-fullscreen #pp-fallback-btn {
	font-size: 22px;
	padding: 20px 48px;
}

@keyframes pp-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media ( max-width: 600px ) {
	#pp-modal {
		width: 100vw;
		height: 100dvh;
		max-width: none;
		max-height: none;
		border-radius: 0;
	}
}
