/* Botão de dúvidas na galeria (otimizado para Web Vitals) */
.woocommerce-product-gallery .lmx-qa-gallery-button {
	display: inline-block;
	width: auto;
	padding: 12px 24px;
	margin: 15px auto 0 auto;
	background-color: #0073aa;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.2s ease;
	/* Previne CLS (Layout Shift) */
	min-height: 44px;
	-webkit-tap-highlight-color: transparent;
	/* Animação shake */
	animation: lmx-shake 3s ease-in-out infinite;
}

/* Container para centralizar o botão */
.woocommerce-product-gallery {
	text-align: center;
}

.woocommerce-product-gallery .lmx-qa-gallery-button:hover {
	background-color: #005a87;
	animation: none;
}

/* Animação de shake suave */
@keyframes lmx-shake {
	0%, 100% {
		transform: translateX(0);
	}
	10%, 30%, 50%, 70%, 90% {
		transform: translateX(-2px);
	}
	20%, 40%, 60%, 80% {
		transform: translateX(2px);
	}
	95% {
		transform: translateX(0);
	}
}

section.woocommerce .lmx-qa-section {
	margin: 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.lmx-qa-title {
	font-size: 18px;
	margin: 0 0 15px 0;
	font-weight: 600;
	color: #333;
}

.lmx-qa-view-all {
	display: inline-block;
	color: #2563eb;
	text-decoration: none;
	font-size: 14px;
	margin-bottom: 15px;
	font-weight: 500;
}

.lmx-qa-view-all:hover {
	text-decoration: underline;
}

.lmx-qa-list {
	margin-bottom: 0;
	margin-top: 15px;
}

.lmx-qa-item {
	padding: 0;
	margin: 0;
}

.lmx-qa-question,
.lmx-qa-answer {
	margin: 0 0 2px 0;
	padding: 0;
	line-height: 1.3;
	font-size: 13px;
}

.lmx-qa-answer {
	margin-bottom: 0;
}

.lmx-qa-question strong,
.lmx-qa-answer strong {
	color: #333;
	font-weight: 600;
}

.lmx-qa-answer strong {
	color: #0073aa;
}

.lmx-qa-divider {
	border: none;
	border-top: 1px solid #e0e0e0;
	margin: 8px 0;
}

.lmx-qa-divider:last-child {
	display: none;
}

.lmx-qa-form-wrapper {
	margin-bottom: 15px;
}

.lmx-qa-form {
	display: flex;
	gap: 10px;
	align-items: stretch;
	margin-bottom: 10px;
}

.lmx-qa-input-question {
	flex: 1;
	padding: 0 16px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	font-size: 14px;
	height: 44px;
	box-sizing: border-box;
	transition: border-color 0.3s;
}

.lmx-qa-input-question:focus {
	outline: none;
	border-color: #8B5CF6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.lmx-qa-btn-ask {
	background: #8B5CF6;
	color: #fff;
	border: none;
	padding: 0 30px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	box-sizing: border-box;
}

.lmx-qa-btn-ask:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.lmx-qa-email-step {
	display: flex;
	gap: 8px;
	align-items: center;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lmx-qa-input-email {
	flex: 1;
	padding: 0 16px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	font-size: 14px;
	height: 44px;
	box-sizing: border-box;
	transition: border-color 0.3s;
}

.lmx-qa-input-email:focus {
	outline: none;
	border-color: #8B5CF6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.lmx-qa-btn-send {
	background: #8B5CF6;
	color: #fff;
	border: none;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	white-space: nowrap;
	height: 44px;
	box-sizing: border-box;
}

.lmx-qa-btn-cancel {
	background: #f3f4f6;
	color: #6b7280;
	border: none;
	padding: 0 20px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
	height: 44px;
	box-sizing: border-box;
}

.lmx-qa-btn-cancel:hover {
	background: #e5e7eb;
}

.lmx-qa-form-messages {
	margin-top: 10px;
}

.lmx-qa-message {
	padding: 10px 15px;
	border-radius: 4px;
	font-size: 13px;
}

.lmx-qa-message.success {
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

.lmx-qa-message.error {
	background: #f8d7da;
	color: #721c24;
	border-left: 4px solid #dc3545;
}

.lmx-qa-similar-found {
	background: #fff;
	border: 2px solid #2563eb;
	border-radius: 8px;
	margin-top: 15px;
	overflow: hidden;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lmx-qa-similar-header {
	background: #2563eb;
	color: #fff;
	padding: 12px 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.lmx-qa-similar-header strong {
	font-size: 14px;
}

.lmx-qa-similar-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.8;
}

.lmx-qa-similar-close:hover {
	opacity: 1;
}

.lmx-qa-similar-content {
	padding: 20px;
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}

.lmx-qa-similar-footer {
	padding: 12px 15px;
	background: #f8f9fa;
	border-top: 1px solid #e0e0e0;
	text-align: center;
}

.lmx-qa-similar-new {
	background: #6b7280;
	color: #fff;
	border: none;
	padding: 8px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
}

.lmx-qa-similar-new:hover {
	background: #4b5563;
}

@media (max-width: 768px) {
	section.woocommerce .lmx-qa-section {
		padding: 15px;
		margin: 0;
	}
	
	.lmx-qa-form {
		flex-direction: column;
	}
	
	.lmx-qa-btn-ask {
		width: 100%;
		justify-content: center;
	}
	
	.lmx-qa-email-step {
		flex-direction: column;
	}
	
	.lmx-qa-btn-send,
	.lmx-qa-btn-cancel {
		width: 100%;
	}
}

