/* assets/css/auth-widget.css

   ==========================================================================
   SPIRITUALIZE AUTH WIDGET - FRONTEND STYLES v1.0.6
   ========================================================================== */

/* Container Principal */
.spiritualize-auth-widget {
	margin: 0 auto;
	padding: 40px;
	background: #ffffff;
	border-radius: 8px;
	box-sizing: border-box;
}

/* Estados (ocultos por padrão) */
.spiritualize-auth-state {
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

.spiritualize-auth-state.active {
	display: block;
	opacity: 1;
}

/* Títulos */
.spiritualize-auth-title {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 600;
	color: #333;
	text-align: center;
}

/* Subtítulos */
.spiritualize-auth-subtitle {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	color: #666;
	text-align: center;
	line-height: 1.6;
}

/* Links dos Subtítulos (separados, display block) */
.spiritualize-auth-subtitle-link {
	display: block;
	margin: 0 0 24px;
	color: #6EC1E4;
	font-size: 14px;
	text-align: center;
	text-decoration: underline;
	cursor: pointer;
	transition: color 0.2s;
}

.spiritualize-auth-subtitle-link:hover {
	color: #5eb0d3;
}

/* Instrução do Código (NOVO) */
.spiritualize-auth-code-instruction {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: #999;
	text-align: center;
	line-height: 1.5;
}

/* Campos de Formulário */
.spiritualize-auth-field {
	margin-bottom: 20px;
}

/* Grid para Nome e Sobrenome (50/50 lado a lado - DESKTOP) */
.spiritualize-auth-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 20px;
}

.spiritualize-auth-field-grid-item {
	/* Cada item ocupa 50% no desktop */
}

.spiritualize-auth-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.spiritualize-auth-input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 15px;
	transition: all 0.2s;
	box-sizing: border-box;
}

.spiritualize-auth-input:focus {
	outline: none;
	border-color: #6EC1E4;
}

/* Placeholder - cor controlada pelo Elementor */
.spiritualize-auth-input::placeholder {
	color: #999;
}

/* Checkbox - Estados: Normal, Hover, Checked */
.spiritualize-auth-checkbox {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
}

.spiritualize-auth-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	border: 1px solid #ddd;
	border-style: solid;
	border-radius: 3px;
	background-color: #ffffff;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	position: relative;
	flex-shrink: 0;
}

/* Checkbox Hover */
.spiritualize-auth-checkbox input[type="checkbox"]:hover {
	background-color: #f0f9fc;
	border-color: #6EC1E4;
}

/* Checkbox Checked */
.spiritualize-auth-checkbox input[type="checkbox"]:checked {
	background-color: #6EC1E4;
	border-color: #6EC1E4;
}

/* Checkmark visual quando checked */
.spiritualize-auth-checkbox input[type="checkbox"]:checked::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 14px;
	font-weight: bold;
	line-height: 1;
}

.spiritualize-auth-checkbox label {
	font-size: 14px;
	color: #666;
	cursor: pointer;
	user-select: none;
}

/* Botões Principais (FULL WIDTH - 100%) */
.spiritualize-auth-button-primary {
	width: 100% !important;
	max-width: 100% !important;
	padding: 14px 24px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
	display: block !important;
	margin-bottom: 12px;
	margin-left: 0 !important;
	margin-right: 0 !important;
	background: #6EC1E4;
	color: #ffffff;
	box-sizing: border-box;
	float: none !important;
}

.spiritualize-auth-button-primary:hover {
	background: #5eb0d3;
}

.spiritualize-auth-button-primary:active {
	transform: none;
}

.spiritualize-auth-button-primary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Botões Secundários (FULL WIDTH - 100%) */
.spiritualize-auth-button-secondary {
	width: 100% !important;
	max-width: 100% !important;
	padding: 14px 24px;
	border: 1px solid #6EC1E4;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
	display: block !important;
	margin-bottom: 12px;
	margin-left: 0 !important;
	margin-right: 0 !important;
	background: transparent;
	color: #6EC1E4;
	box-sizing: border-box;
	float: none !important;
}

.spiritualize-auth-button-secondary:hover {
	background: #f0f9fc;
}

.spiritualize-auth-button-secondary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Ocultar botão de reenvio quando timer está ativo */
.spiritualize-auth-button-secondary[data-action="resend-otp"].timer-active {
	display: none !important;
}

/* Timer de Reenvio */
.spiritualize-auth-resend-timer {
	display: block;
	margin-top: 0;
	margin-bottom: 12px;
	text-align: center;
	font-size: 14px;
	color: #999;
	/* Oculto por padrão (aparece apenas quando timer está ativo) */
	opacity: 0;
	height: 0;
	overflow: hidden;
	transition: opacity 0.3s ease, height 0.3s ease;
}

/* Mostrar timer quando tiver conteúdo */
.spiritualize-auth-resend-timer.active {
	opacity: 1;
	height: auto;
	overflow: visible;
}

/* Links do Footer (abaixo dos botões, centralizados) */
.spiritualize-auth-footer-link {
	display: block;
	margin-bottom: 12px;
	padding: 8px 0;
	color: #6EC1E4;
	font-size: 14px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s;
}

.spiritualize-auth-footer-link:hover {
	color: #5eb0d3;
	text-decoration: underline;
}

/* Mensagens */
.spiritualize-auth-message {
	padding: 15px 15px;
	margin-top: 25px;
	margin-bottom: 25px;
	font-size: 14px;
	display: none;
}

.spiritualize-auth-message.show {
	display: block;
}

.spiritualize-auth-message-success {
	background: #A080D8;
	color: #1e1e1e;
	border: 1px solid #A080D8;
	border-radius: 15px;
}

.spiritualize-auth-message-error {
	background: #A080D8;
	color: #1e1e1e;
	border: 1px solid #A080D8;
	border-radius: 15px;
}

.spiritualize-auth-message-info {
	background: #A080D8;
	color: #1e1e1e;
	border: 1px solid #A080D8;
	border-radius: 15px;
}

/* Loading State (sem sombras ou transforms hardcoded) */
.spiritualize-auth-button-primary.loading,
.spiritualize-auth-button-secondary.loading {
	position: relative;
	color: transparent;
	pointer-events: none;
}

.spiritualize-auth-button-primary.loading::after,
.spiritualize-auth-button-secondary.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid transparent;
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spiritualize-spin 0.6s linear infinite;
}

.spiritualize-auth-button-secondary.loading::after {
	border-top-color: #6EC1E4;
}

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

/* Timer de Reenvio */
.spiritualize-auth-resend-timer {
	display: block;
	margin-top: -8px;
	margin-bottom: 12px;
	text-align: center;
	font-size: 14px;
	color: #999;
}

/* Código OTP com espaçamento */
.spiritualize-auth-input-code {
	text-align: center;
	letter-spacing: 8px;
	font-size: 24px;
	font-family: 'Courier New', monospace;
	font-weight: 600;
}

/* Responsivo - MOBILE */
@media (max-width: 768px) {
	.spiritualize-auth-widget {
		padding: 24px;
	}
	
	.spiritualize-auth-title {
		font-size: 20px;
	}
	
	.spiritualize-auth-button-primary,
	.spiritualize-auth-button-secondary {
		font-size: 15px;
		padding: 12px 20px;
	}
	
	/* Nome/Sobrenome TAMBÉM lado a lado no mobile (grid 50/50) */
	.spiritualize-auth-field-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
}

.spiritualize-auth-otp-timer,
.spiritualize-auth-otp-timer .seconds {
    color: #A080D8 !important;
}

/* Checkboxes de Termos */
.spiritualize-auth-terms-checkbox {
	display: flex;
	align-items: flex-start;
	margin-bottom: 12px;
}

.spiritualize-auth-terms-checkbox input[type="checkbox"] {
	margin-top: 2px;
}

.spiritualize-auth-terms-checkbox label a {
	text-decoration: underline;
	color: #A080D8;
	transition: color 0.2s;
}

.spiritualize-auth-terms-checkbox label a:hover {
	color: #A080D8;
}