/* Frontend Styles for Anúncios Afiliados Plugin - Modern Design */

/* ========================================
   ISOLAMENTO TOTAL DE ESTILOS EXTERNOS
   Previne conflitos com listas, posts relacionados, etc.
   ======================================== */

.aa-anuncio-modern,
.aa-anuncio {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	position: relative !important;
	z-index: 1 !important;
	list-style: none !important;
	list-style-type: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	text-indent: 0 !important;
}

/* Reset para quando inserido dentro de listas */
ul .aa-anuncio-modern,
ol .aa-anuncio-modern,
li .aa-anuncio-modern,
ul .aa-anuncio,
ol .aa-anuncio,
li .aa-anuncio,
.wp-block-list .aa-anuncio-modern,
.wp-block-list .aa-anuncio,
article .aa-anuncio-modern,
article .aa-anuncio {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 32px 0 !important;
	padding: 0 !important;
	list-style: none !important;
	list-style-type: none !important;
	text-indent: 0 !important;
}

/* Garante que elementos internos não herdem estilos de lista */
.aa-anuncio-modern *,
.aa-anuncio * {
	list-style: none !important;
	list-style-type: none !important;
}

.aa-anuncio-modern::before,
.aa-anuncio-modern::after,
.aa-anuncio::before,
.aa-anuncio::after,
.aa-anuncio-modern *::before,
.aa-anuncio-modern *::after,
.aa-anuncio *::before,
.aa-anuncio *::after {
	content: none !important;
	display: none !important;
}

/* Exceção para ícones SVG que usamos */
.aa-anuncio-modern .aa-check-icon,
.aa-anuncio-modern .aa-btn-icon,
.aa-anuncio .aa-diferencial-icon {
	display: inline-flex !important;
}

/* ========================================
   NOVO DESIGN MODERNO COM ÍCONES
   ======================================== */

.aa-anuncio-modern {
	margin: 32px 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.aa-anuncio-modern * {
	box-sizing: border-box;
}

.aa-card {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
	border-radius: 20px;
	box-shadow: 
		0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06),
		0 20px 25px -5px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.8);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aa-card:hover {
	transform: translateY(-4px);
	box-shadow: 
		0 10px 15px -3px rgba(0, 0, 0, 0.1),
		0 4px 6px -2px rgba(0, 0, 0, 0.05),
		0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Header */
.aa-card-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 12px 20px;
	text-align: center;
}

.aa-badge {
	display: inline-block;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	animation: aa-pulse-glow 2s ease-in-out infinite;
}

/* Animação sutil de pulso/brilho */
@keyframes aa-pulse-glow {
	0%, 100% {
		opacity: 1;
		text-shadow: 0 0 0 rgba(255, 255, 255, 0);
	}
	50% {
		opacity: 0.85;
		text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
	}
}

/* Body */
.aa-card-body {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	padding: 24px;
}

/* Image */
.aa-card-image {
	flex-shrink: 0;
	width: 200px;
	height: 200px;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
}

.aa-card-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.aa-card:hover .aa-card-image img {
	transform: scale(1.05);
}

/* Content */
.aa-card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.aa-card-title {
	margin: 0 0 12px 0 !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	line-height: 1.3 !important;
	letter-spacing: -0.02em;
}

.aa-card-desc {
	margin: 0 0 16px 0 !important;
	font-size: 15px !important;
	color: #64748b !important;
	line-height: 1.6 !important;
}

/* Features/Differentials */
.aa-card-features {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.aa-feature-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	color: #047857;
	font-size: 13px;
	font-weight: 600;
	border-radius: 50px;
	border: 1px solid #a7f3d0;
}

.aa-check-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Buttons Section - Ocupa toda a largura */
.aa-card-buttons {
	width: 100%;
	margin-top: 0;
	padding-top: 20px;
	border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.aa-buttons-label {
	margin: 0 0 12px 0 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #94a3b8 !important;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.aa-buttons-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Store Buttons */
.aa-store-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 24px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	border-radius: 12px;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	border: none;
	cursor: pointer;
	flex: 1 1 0;
	min-width: 150px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.aa-store-btn:hover {
	transform: translateY(-3px) scale(1.02);
	text-decoration: none !important;
}

.aa-btn-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	object-fit: contain;
}

/* Amazon Button */
.aa-btn-amazon {
	background: linear-gradient(135deg, #232F3E 0%, #131921 100%);
	color: #fff !important;
}

.aa-btn-amazon:hover {
	background: linear-gradient(135deg, #131921 0%, #0a0d10 100%);
	color: #fff !important;
	box-shadow: 0 8px 25px rgba(35, 47, 62, 0.5);
}

.aa-btn-amazon .aa-btn-icon {
	filter: brightness(0) saturate(100%) invert(67%) sepia(67%) saturate(2127%) hue-rotate(360deg) brightness(103%) contrast(106%);
}

/* Mercado Livre Button */
.aa-btn-mercadolivre {
	background: linear-gradient(135deg, #FFE600 0%, #FFD000 100%);
	color: #333 !important;
}

.aa-btn-mercadolivre:hover {
	background: linear-gradient(135deg, #FFD000 0%, #E6B800 100%);
	color: #333 !important;
	box-shadow: 0 8px 25px rgba(255, 230, 0, 0.5);
}

.aa-btn-mercadolivre .aa-btn-icon {
	filter: none;
}

/* Shopee Button */
.aa-btn-shopee {
	background: linear-gradient(135deg, #EE4D2D 0%, #D73211 100%);
	color: #fff !important;
}

.aa-btn-shopee:hover {
	background: linear-gradient(135deg, #D73211 0%, #B82A0E 100%);
	color: #fff !important;
	box-shadow: 0 8px 25px rgba(238, 77, 45, 0.5);
}

.aa-btn-shopee .aa-btn-icon {
	filter: brightness(0) invert(1);
}

/* ========================================
   AVISO DE TRANSPARÊNCIA
   ======================================== */

.aa-transparency-notice {
	width: 100%;
	margin-top: 20px;
	padding: 16px 20px;
	background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
	border-radius: 12px;
	border-left: 4px solid #eab308;
}

.aa-transparency-notice p {
	margin: 0 !important;
	font-size: 13px !important;
	line-height: 1.6 !important;
	color: #713f12 !important;
}

.aa-transparency-notice strong {
	color: #854d0e !important;
	font-weight: 700 !important;
}

@media (max-width: 480px) {
	.aa-transparency-notice {
		padding: 12px 14px;
		margin-top: 16px;
	}

	.aa-transparency-notice p {
		font-size: 12px !important;
	}
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
	.aa-card-body {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 20px;
		gap: 20px;
	}

	.aa-card-image {
		width: 180px;
		height: 180px;
	}

	.aa-card-content {
		align-items: center;
		width: 100%;
	}

	.aa-card-title {
		font-size: 20px !important;
	}

	.aa-card-features {
		justify-content: center;
	}

	.aa-card-buttons {
		text-align: center;
	}

	.aa-buttons-label {
		text-align: center;
	}

	.aa-buttons-grid {
		justify-content: center;
		width: 100%;
	}

	.aa-store-btn {
		flex: 1 1 calc(50% - 6px);
		min-width: 140px;
		padding: 14px 16px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.aa-anuncio-modern {
		margin: 20px 0;
	}

	.aa-card {
		border-radius: 16px;
	}

	.aa-card-header {
		padding: 10px 16px;
	}

	.aa-badge {
		font-size: 12px;
		letter-spacing: 1px;
	}

	.aa-card-body {
		padding: 16px;
		gap: 16px;
	}

	.aa-card-image {
		width: 150px;
		height: 150px;
		border-radius: 12px;
	}

	.aa-card-title {
		font-size: 18px !important;
	}

	.aa-card-desc {
		font-size: 14px !important;
	}

	.aa-feature-tag {
		font-size: 12px;
		padding: 5px 12px;
	}

	.aa-card-buttons {
		padding-top: 16px;
	}

	.aa-buttons-grid {
		flex-direction: column;
		width: 100%;
	}

	.aa-store-btn {
		width: 100%;
		flex: 1 1 100%;
		min-width: unset;
		padding: 14px 20px;
	}

	.aa-btn-icon {
		width: 20px;
		height: 20px;
	}
}

/* ========================================
   LEGACY SUPPORT (old template)
   ======================================== */

.aa-anuncio {
	display: flex;
	gap: 20px;
	padding: 20px;
	margin: 30px 0;
	background-color: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s ease;
}

.aa-anuncio:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.aa-imagem {
	flex-shrink: 0;
	width: 200px;
	height: 200px;
	overflow: hidden;
	border-radius: 6px;
	background-color: #fff;
}

.aa-imagem img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	background-color: #fff;
}

.aa-conteudo {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.aa-titulo {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 600;
	color: #222;
	line-height: 1.4;
}

.aa-descricao {
	margin: 0 0 15px 0;
	font-size: 14px;
	color: #666;
	line-height: 1.6;
}

.aa-botoes {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.aa-botao {
	display: inline-block;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	text-align: center;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.aa-botao-amazon {
	background: linear-gradient(135deg, #FF9900 0%, #e68a00 100%);
	color: #fff;
}

.aa-botao-amazon:hover {
	background: linear-gradient(135deg, #e68a00 0%, #d47a00 100%);
	text-decoration: none;
	color: #fff;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-2px);
}

.aa-botao-mercado-livre {
	background: linear-gradient(135deg, #27AE60 0%, #1E8449 100%);
	color: #fff;
}

.aa-botao-mercado-livre:hover {
	background: linear-gradient(135deg, #1E8449 0%, #145A32 100%);
	text-decoration: none;
	color: #fff;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-2px);
}

/* Diferenciais */
.aa-diferenciais {
	list-style: none;
	padding: 12px 0;
	margin: 12px 0;
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

.aa-diferencial-item {
	display: flex;
	align-items: center;
	padding: 0;
	font-size: 14px;
	color: #333;
	flex: 0 1 auto;
}

.aa-diferencial-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-right: 10px;
	background-color: #27AE60;
	color: #fff;
	border-radius: 50%;
	font-weight: bold;
	font-size: 14px;
	flex-shrink: 0;
}

.aa-diferencial-text {
	flex: 1;
}
