/* Vertex Bazaar — Google Login Popup (theme)
   Colors follow assets/css/color-modes.css (--vb-*) for dark / light / system. */

.glp-popup-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.58);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	-webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .glp-popup-overlay {
	background-color: rgba(26, 29, 46, 0.45);
}

@media (prefers-color-scheme: light) {
	html:not([data-theme="dark"]) .glp-popup-overlay {
		background-color: rgba(26, 29, 46, 0.45);
	}
}

.glp-popup-overlay.active {
	display: flex;
	opacity: 1;
	visibility: visible;
	pointer-events: all;
}

.glp-modal-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 500px;
}

.glp-modal-content {
	position: relative;
	color: var(--vb-text, #fff);
	background: linear-gradient(
		135deg,
		var(--vb-bg-card-alt, #2b304c) 0%,
		var(--vb-bg-card, #0f1526) 50%,
		var(--vb-bg-card-alt, #2b304c) 100%
	);
	border-radius: 1rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
	width: 100%;
	max-width: 450px;
	padding: 2.25rem 1.75rem 2rem;
	border: 1px solid var(--vb-border-subtle, rgba(255, 255, 255, 0.08));
	transform: scale(0.9) translateY(-20px);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

html[data-theme="light"] .glp-modal-content {
	box-shadow: 0 20px 48px -12px rgba(26, 29, 46, 0.18);
}

@media (prefers-color-scheme: light) {
	html:not([data-theme="dark"]) .glp-modal-content {
		box-shadow: 0 20px 48px -12px rgba(26, 29, 46, 0.18);
	}
}

.glp-modal-content.active {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.glp-close-btn {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2rem;
	height: 2rem;
	min-width: 40px;
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--vb-glass-row, rgba(255, 255, 255, 0.06));
	border: 1px solid var(--vb-border-subtle, rgba(255, 255, 255, 0.1));
	color: var(--vb-text-muted, #9ca3af);
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: color 0.2s, background 0.2s, border-color 0.2s;
	z-index: 6;
	box-sizing: border-box;
}

.glp-close-btn:hover {
	color: var(--vb-text, #fff);
	background: var(--vb-bg-select, rgba(255, 255, 255, 0.12));
	border-color: var(--vb-border, rgba(255, 255, 255, 0.2));
}

.glp-logo-section {
	display: flex;
	justify-content: center;
	margin-bottom: 2rem;
}

.glp-logo-wrapper {
	background: var(--card-bg, rgba(255, 255, 255, 0.08));
	padding: 1rem;
	border-radius: 1rem;
	border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12));
}

.glp-logo {
	width: 112px;
	height: auto;
	display: block;
}

.glp-welcome-text,
.glp-title,
.glp-subtitle {
	text-align: center;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.glp-title {
	color: var(--vb-text, #fff);
}

.glp-subtitle {
	font-size: 0.875rem;
	color: var(--vb-text-muted, #9ca3af);
	margin: 0;
}

.glp-button-wrapper {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	margin-bottom: 0;
	gap: 0.35rem;
}

.glp-google-admin-hint {
	margin: 0;
	font-size: 0.7rem;
	line-height: 1.35;
	color: var(--vb-text-muted, #9ca3af);
	text-align: center;
	opacity: 0.9;
}

.glp-google-btn {
	position: relative;
	width: 100%;
	background: #fff;
	color: #1f2937;
	font-weight: 600;
	font-size: 1rem;
	padding: 1rem 1.5rem;
	min-height: 48px;
	border-radius: 0.75rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.08);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	transition: all 0.3s ease;
	text-align: center;
}

.glp-google-btn:hover {
	background: #f9fafb;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
	transform: scale(1.02);
}

.glp-google-btn:active {
	transform: scale(0.98);
}

.glp-google-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.glp-google-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glp-google-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.glp-btn-text {
	text-align: center;
	width: 100%;
	display: block;
}

.glp-arrow-icon {
	width: 1.25rem;
	height: 1.25rem;
	transition: transform 0.2s;
}

.glp-google-btn:hover .glp-arrow-icon {
	transform: translateX(4px);
}

.glp-divider-wrapper {
	display: flex;
	align-items: center;
	margin: 0.5rem 0 0.5rem;
	gap: 0.75rem;
}

#glp-email-section {
	margin: 0;
	padding: 0;
}

#glp-email-step0 {
	margin: 0;
}

.glp-divider-line {
	flex: 1;
	height: 1px;
	background: var(--vb-border, #374151);
}

.glp-divider-text {
	font-size: 0.875rem;
	color: var(--vb-text-muted2, #6b7280);
	white-space: nowrap;
}

.glp-terms-text {
	font-size: 0.75rem;
	text-align: center;
	color: var(--vb-text-muted, #6b7280);
	line-height: 1.5;
	margin: 0.75rem 0 0;
}

.glp-link {
	color: var(--vb-accent, #60a5fa);
	text-decoration: underline;
	transition: color 0.2s;
}

.glp-link:hover {
	color: var(--vb-accent-orange, #ff8c00);
	filter: brightness(1.08);
}

.glp-decor-blue,
.glp-decor-purple {
	position: absolute;
	width: 10rem;
	height: 10rem;
	border-radius: 50%;
	opacity: 0.06;
	pointer-events: none;
	z-index: 0;
}

.glp-decor-blue {
	top: -3rem;
	right: -3rem;
	background: #3b82f6;
}

.glp-decor-purple {
	bottom: -3rem;
	left: -3rem;
	background: #a855f7;
}

.glp-modal-content > :not(.glp-decor-blue):not(.glp-decor-purple):not(.glp-close-btn) {
	position: relative;
	z-index: 1;
}

.glp-phone-modal {
	max-width: 400px;
}

.glp-phone-icon {
	text-align: center;
	font-size: 3rem;
	margin-bottom: 1rem;
}

.glp-input-wrapper {
	margin: 1.5rem 0;
}

.glp-field-label {
	display: block;
	color: var(--vb-text-muted, #9ca3af);
	font-size: 13px;
	margin-bottom: 6px;
	text-align: left;
}

.glp-phone-input {
	width: 100%;
	background: var(--vb-bg-input, rgba(255, 255, 255, 0.05));
	border: 2px solid var(--vb-border-input, rgba(75, 85, 99, 0.3));
	border-radius: 0.75rem;
	padding: 1rem 1.25rem;
	font-size: 1rem;
	min-height: 48px;
	color: var(--vb-text, #fff);
	text-align: center;
	transition: all 0.3s ease;
	outline: none;
	box-sizing: border-box;
}

.glp-phone-input::placeholder {
	color: var(--vb-text-muted2, #6b7280);
	opacity: 0.85;
}

.glp-phone-input:focus {
	border-color: var(--vb-accent, #60a5fa);
	background: var(--vb-bg-select, var(--vb-bg-input));
	box-shadow: 0 0 0 3px rgba(47, 181, 255, 0.22);
}

html[data-theme="light"] .glp-phone-input:focus {
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

@media (prefers-color-scheme: light) {
	html:not([data-theme="dark"]) .glp-phone-input:focus {
		box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
	}
}

.glp-error-text {
	font-size: 0.875rem;
	color: #ef4444;
	text-align: center;
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: rgba(239, 68, 68, 0.1);
	border-radius: 0.5rem;
}

.glp-phone-btn {
	margin-top: 1rem;
}

.glp-email-toggle-btn {
	width: 100%;
	background: linear-gradient(135deg, #3b4fd8 0%, #6366f1 100%);
	color: #fff;
	border: none;
	font-weight: 600;
	font-size: 1rem;
	padding: 1rem 1.5rem;
	border-radius: 0.75rem;
	box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
	cursor: pointer;
	transition: all 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.glp-email-toggle-btn:hover {
	background: linear-gradient(135deg, #3245c8 0%, #5254e0 100%);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
	transform: scale(1.02);
	color: #fff;
}

#glp-email-step1,
#glp-email-step2 {
	animation: glp-fade-in 0.2s ease;
}

@keyframes glp-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.glp-email-back-wrap,
.glp-otp-actions {
	text-align: center;
	margin: 8px 0 0;
}

.glp-text-link {
	color: var(--vb-text-muted, #9ca3af);
	font-size: 13px;
	cursor: pointer;
}

.glp-link-primary {
	color: var(--vb-accent, #60a5fa);
	font-size: 13px;
	cursor: pointer;
}

.glp-dot {
	color: var(--vb-text-muted, #9ca3af);
}

.glp-otp-sent-msg {
	text-align: center;
	color: var(--vb-text-muted, #9ca3af);
	font-size: 13px;
	margin: 0 0 12px;
}

#glp-otp-input {
	letter-spacing: 8px;
	font-size: 22px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.glp-spinner {
	animation: spin 1s linear infinite;
}

.glp-google-btn.loading {
	pointer-events: none;
	opacity: 0.7;
}

@media (max-width: 640px) {
	.glp-modal-content {
		padding: 2rem 1.25rem;
		max-height: min(92vh, 720px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.glp-title {
		font-size: 1.5rem;
	}

	.glp-logo {
		width: 96px;
	}

	.glp-phone-icon {
		font-size: 2.5rem;
	}

	.glp-popup-overlay {
		padding: 10px;
		padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
	}

	.glp-modal-wrapper {
		max-height: min(92vh, 100%);
	}
}
