/**
 * Themes section: template picker grid (Customizer controls frame).
 */

.aio-login__customizer-template-grid-wrap {
	margin-top: 8px;
}

.aio-login__customizer-template-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
}

/* Selected template — full width row at top */
.aio-login__customizer-template-grid--selected {
	grid-template-columns: 1fr;
	margin: 0 0 10px;
}

.aio-login__customizer-template-item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin: 0;
	padding: 0;
	border: 2px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aio-login__customizer-template-item:hover {
	border-color: #7c3aed;
}

.aio-login__customizer-template-item.is-selected {
	border-color: #9416de;
	box-shadow: 0 0 0 1px #9416de;
}

.aio-login__customizer-template-thumb-wrap {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f0f0f1;
	border-radius: 4px 4px 0 0;
}

.aio-login__customizer-template-thumb-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aio-login__customizer-template-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 1.5rem;
	font-weight: 600;
	color: #646970;
}

.aio-login__customizer-template-name {
	display: block;
	padding: 6px 6px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.25;
	color: #1d2327;
}

.aio-login__customizer-template-item.is-selected .aio-login__customizer-template-name {
	color: #9416de;
}

/* Locked Pro templates */
.aio-login__customizer-template-item.is-locked .aio-login__customizer-template-thumb-wrap img,
.aio-login__customizer-template-item.is-locked .aio-login__customizer-template-fallback {
	filter: grayscale(0.35);
	opacity: 0.85;
}

.aio-login__customizer-template-item.is-locked {
	cursor: pointer;
}

/* Google Fonts: search + grid (with preview text) */
.aio-login__customizer-font-search {
	width: 100%;
	margin: 8px 0 10px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 13px;
	box-sizing: border-box;
}

.aio-login__customizer-font-grid-wrap {
	margin-top: 4px;
}

/* Selected font — full width row under search */
.aio-login__customizer-font-grid--selected {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin: 0 0 10px;
	padding: 0;
}

/* Free-tier: extra free template(s) sit above the Pro-gated row (no overlay on free tiles). */
.aio-login__customizer-template-catalog-free {
	margin-bottom: 10px;
}

/* Catalog + single Pro overlay (fonts + templates; free installs) */
.aio-login__customizer-pro-gate-area {
	position: relative;
	min-height: 120px;
}

.aio-login__customizer-pro-gate-area .aio-login__customizer-font-grid--catalog,
.aio-login__customizer-pro-gate-area .aio-login__customizer-template-grid--catalog {
	position: relative;
	z-index: 1;
}

.aio-login__customizer-font-pro-unified-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.42);
	backdrop-filter: blur(0.5px);
	border-radius: 6px;
}

.aio-login__customizer-font-pro-unified-overlay-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 16px;
	text-align: center;
	pointer-events: none;
}

.aio-login__customizer-font-pro-unified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: linear-gradient(135deg, #9416de 0%, #490f95 100%);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(73, 15, 149, 0.35);
}

.aio-login__customizer-pro-unified-hint {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
	max-width: 200px;
}

.aio-login__customizer-font-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	max-height: min(52vh, 420px);
	overflow-y: auto;
	padding: 2px 4px 6px 0;
	margin: 0;
	-webkit-overflow-scrolling: touch;
}

.aio-login__customizer-font-item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin: 0;
	padding: 0;
	border: 2px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	min-width: 0;
}

.aio-login__customizer-font-item:hover {
	border-color: #7c3aed;
}

.aio-login__customizer-font-item.is-selected {
	border-color: #9416de;
	box-shadow: 0 0 0 1px #9416de;
}

.aio-login__customizer-font-preview-wrap {
	position: relative;
	display: block;
	min-height: 44px;
	padding: 8px 8px 4px;
	background: #f6f7f7;
	border-radius: 4px 4px 0 0;
	overflow: hidden;
}

.aio-login__customizer-font-preview {
	display: block;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: #1d2327;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aio-login__customizer-font-name {
	display: block;
	padding: 6px 8px 8px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.25;
	color: #50575e;
	word-break: break-word;
}

.aio-login__customizer-font-item.is-selected .aio-login__customizer-font-name {
	color: #9416de;
}

.aio-login__customizer-font-item.is-locked {
	cursor: pointer;
}

/*
 * Customizer “Get Pro” = same structure/styles as aio-login-popup.vue + aio-login-pro-popup.vue
 */
.aio-login__popup-wrapper.aio-login-customizer-pro-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 500000;
	backdrop-filter: blur(1px);
	display: flex;
	justify-content: center;
	align-items: center;
}

.aio-login__popup-wrapper.aio-login-customizer-pro-modal[hidden] {
	display: none !important;
}

.aio-login-customizer-pro-modal .aio-login__popup-container.aio-login-customizer-pro-popup-box {
	padding: 0;
	overflow: hidden;
	background-color: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	position: relative;
	border: 1px solid #9416de;
	box-sizing: border-box;
}

.aio-login-customizer-pro-modal .aio-login__popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 40;
}

.aio-login-customizer-pro-modal .aio-login__popup-close button {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

.aio-login-customizer-pro-modal .aio-login-pro__container {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	background-color: #490f95;
	box-shadow: 0 4px 16px 6px rgba(0, 0, 0, 0.08);
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	background-repeat: no-repeat, no-repeat;
	background-position: left bottom, right bottom;
}

.aio-login-customizer-pro-modal .aio-login-pro__container::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: -120px;
	width: 270px;
	height: 270px;
	background-color: #0c9;
	opacity: 0.5;
	border-radius: 270px;
	filter: blur(125px);
	pointer-events: none;
}

.aio-login-customizer-pro-modal .aio-login-pro__container::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: -120px;
	width: 270px;
	height: 270px;
	background-color: #ffba08;
	opacity: 0.5;
	border-radius: 270px;
	filter: blur(125px);
	pointer-events: none;
}

.aio-login-customizer-pro-modal .aio-login-pro-popup__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 24px;
	height: 100%;
	box-sizing: border-box;
}

.aio-login-customizer-pro-modal .aio-login-pro-popup__logo {
	display: block;
	max-width: 200px;
	width: auto;
	height: auto;
	margin: 0 auto 16px;
}

.aio-login-customizer-pro-modal .aio-login__title {
	margin: 0 0 20px;
	color: #fff;
	font-family: Figtree, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 24px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
}

.aio-login-customizer-pro-modal .aio-login__button {
	display: inline-flex;
	padding: 16px 32px;
	justify-content: center;
	align-items: center;
	gap: 10px;
	border-radius: 4px;
	background: #ffba08;
	text-decoration: none;
	color: #490f95;
	font-family: Figtree, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 18px;
	font-style: normal;
	font-weight: 600;
	line-height: 100%;
}
