
/**
 * Photo Guidelines Popup Styles
 *
 * Self-contained: includes both modal chrome (.pgp-modal*) and the inner
 * photo guidelines layout (.pgp-scope .pg-*) so it works on any page where
 * the shortcode is placed, even when the page template's CSS is absent.
 *
 * @package Edubai Theme
 */

/* ==================== Modal Chrome ==================== */
.pgp-modal {
	--pgp-primary: #001f3f;
	--pgp-secondary: #ff8c00;
	--pgp-text: #333;
	--pgp-light-bg: #f8f9fa;
	--pgp-border: #e0e0e0;
	--pgp-shadow: 0 2px 8px rgba(0, 0, 0, .1);
	--pgp-shadow-hover: 0 4px 16px rgba(0, 0, 0, .15);
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.pgp-modal[hidden] {
	display: none !important;
}

.pgp-modal.is-open {
	display: flex;
}

.pgp-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: pgpFadeIn .2s ease-out;
}

.pgp-modal__dialog {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 1100px;
	max-height: 92vh;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: pgpZoomIn .22s ease-out;
}

.pgp-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: var(--pgp-primary);
	cursor: pointer;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	transition: background .15s ease, transform .15s ease;
}

.pgp-modal__close:hover, .pgp-modal__close:focus-visible {
	background: var(--pgp-secondary);
	color: #fff;
	transform: scale(1.05);
	outline: none;
}

.pgp-modal__close svg {
	width: 18px;
	height: 18px;
}

.pgp-modal__body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
}

/* Prevent background scroll while modal is open */
body.pgp-modal-open {
	overflow: hidden;
}

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

@keyframes pgpZoomIn {
	from {
		opacity: 0;
		transform: scale(.96);
	}
	
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Click hint for the trigger element on the form */
#wpforms-2168-field_12-description {
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: #ff8c00;
	transition: color .15s ease;
}

#wpforms-2168-field_12-description:hover {
	color: #001f3f;
}

/* ==================== Inner Photo Guidelines Layout ==================== */

/* Scoped under .pgp-scope so it never collides with the standalone template. */
.pgp-scope.photo-guidelines-container {
	width: 100%;
	background-color: var(--pgp-light-bg);
	padding: 1rem 0;
}

.pgp-scope .photo-guidelines-wrapper {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1rem;
}

.pgp-scope .pg-header {
	text-align: center;
	padding: 1.25rem 0 .75rem;
	margin-bottom: 1rem;
}

.pgp-scope .pg-title {
	font-size: clamp(1.4rem, 4vw, 2.25rem);
	font-weight: 700;
	color: var(--pgp-primary);
	margin: 0 0 .5rem 0;
	line-height: 1.2;
	letter-spacing: -.5px;
}

.pgp-scope .pg-subtitle {
	font-size: clamp(.95rem, 1.6vw, 1.1rem);
	color: var(--pgp-text);
	margin: 0;
	opacity: .85;
	font-weight: 500;
}

.pgp-scope .pg-photo-section {
	margin-bottom: 1.5rem;
}

.pgp-scope .pg-photo-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: .5rem 0;
	border-radius: 12px;
}

.pgp-scope .pg-sample-photo {
	max-width: 100%;
	max-height: 280px;
	width: auto;
	height: auto;
	border-radius: 8px;
	display: block;
	object-fit: contain;
}

.pgp-scope .pg-guidelines-section {
	margin-bottom: 1.5rem;
}

.pgp-scope .pg-guidelines-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	max-width: 900px;
	margin: 0 auto;
	justify-content: center;
}

@media (max-width: 1024px) {
	.pgp-scope .pg-guidelines-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 600px;
	}
}

.pgp-scope .pg-guideline-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--pgp-border);
	border-radius: 12px;
	padding: 1.25rem 1rem 1rem;
	text-align: center;
	box-shadow: var(--pgp-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.pgp-scope .pg-guideline-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--pgp-shadow-hover);
	border-color: var(--pgp-secondary);
}

.pgp-scope .pg-card-number {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	width: 28px;
	height: 28px;
	background: var(--pgp-secondary);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .85rem;
	box-shadow: 0 2px 6px rgba(255, 140, 0, .4);
}

.pgp-scope .pg-card-icon {
	width: 48px;
	height: 48px;
	margin: .25rem auto .75rem;
	color: var(--pgp-primary);
}

.pgp-scope .pg-card-icon svg {
	width: 100%;
	height: 100%;
}

.pgp-scope .pg-card-title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--pgp-primary);
	margin: 0 0 .4rem 0;
}

.pgp-scope .pg-card-description {
	font-size: .875rem;
	line-height: 1.5;
	color: var(--pgp-text);
	margin: 0;
	opacity: .85;
}

.pgp-scope .pg-requirements-footer {
	background: #fff;
	border: 1px solid var(--pgp-border);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.pgp-scope .pg-requirements-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: .75rem;
}

.pgp-scope .pg-requirement-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	color: var(--pgp-primary);
	font-weight: 600;
	font-size: .95rem;
}

.pgp-scope .pg-requirement-item svg {
	width: 20px;
	height: 20px;
	color: #2ecc71;
	flex-shrink: 0;
}

/* ==================== Responsive ==================== */
@media (max-width: 640px) {
	.pgp-modal {
		padding: 8px;
	}
	
	.pgp-modal__dialog {
		max-height: 96vh;
		border-radius: 10px;
	}
	
	.pgp-scope .pg-guidelines-grid {
		grid-template-columns: 1fr;
		max-width: 320px;
	}
	
	.pgp-scope .pg-sample-photo {
		max-height: 220px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pgp-modal__backdrop, .pgp-modal__dialog {
		animation: none;
	}
	
	.pgp-scope .pg-guideline-card {
		transition: none;
	}
}
