/**
 * Advanced Google Login - Frontend Styles
 * @package Advanced_Google_Login
 * @since 2.0.0
 */

/* Container do botão de login */
.agl-login-button-wrapper {
	width: 100%;
	max-width: 400px;
	margin: 20px auto;
	text-align: center;
}

/* Separador "Ou" */
.agl-separator {
	position: relative;
	margin: 20px 0;
	text-align: center;
}

.agl-separator::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: #ddd;
	z-index: 0;
}

.agl-separator span {
	position: relative;
	display: inline-block;
	padding: 0 15px;
	background: #fff;
	color: #666;
	font-size: 14px;
	z-index: 1;
}

/* Estilos para página de login do WordPress */
#loginform .agl-login-button-wrapper {
	margin: 0 0 20px 0;
}

#loginform .g_id_signin {
	display: flex !important;
	justify-content: center;
	align-items: center;
}

/* Estilos para WooCommerce */
.agl-wc-login {
	margin: 0 0 20px 0;
}

/* Estilos para shortcode */
.agl-shortcode {
	margin: 20px 0;
}

/* Google One Tap Widget */
#g_id_onload {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 999999;
}

/* Responsividade */
@media screen and (max-width: 600px) {
	.agl-login-button-wrapper {
		max-width: 100%;
		padding: 0 10px;
	}
	
	.agl-separator {
		margin: 15px 0;
	}
}

/* Loading state */
.agl-loading {
	opacity: 0.6;
	pointer-events: none;
}

.agl-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #4285f4;
	border-top-color: transparent;
	border-radius: 50%;
	animation: agl-spin 0.6s linear infinite;
}

@keyframes agl-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Error message */
.agl-error-message {
	background: #f8d7da;
	color: #721c24;
	padding: 12px 15px;
	margin: 15px 0;
	border-radius: 4px;
	border: 1px solid #f5c6cb;
	text-align: left;
}

.agl-error-message strong {
	display: block;
	margin-bottom: 5px;
}

/* Success message */
.agl-success-message {
	background: #d4edda;
	color: #155724;
	padding: 12px 15px;
	margin: 15px 0;
	border-radius: 4px;
	border: 1px solid #c3e6cb;
	text-align: left;
}

/* Customização adicional do botão Google */
.g_id_signin {
	display: inline-block;
	width: 100% !important;
	max-width: 400px;
}

/* Fix para temas que podem interferir */
.agl-login-button-wrapper * {
	box-sizing: border-box;
}

/* Acessibilidade */
.agl-login-button-wrapper:focus-visible {
	outline: 2px solid #4285f4;
	outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.agl-separator::before {
		background: #444;
	}
	
	.agl-separator span {
		background: #1e1e1e;
		color: #ccc;
	}
}

