/**
 * ReceitasProWPX - Estilos Frontend para Widgets
 * Versão: 1.6.0
 */

/* ==========================================================================
   1. Estilos Compartilhados e Container de Widgets
   ========================================================================== */
.rwpx-widget {
	margin-bottom: 24px;
	font-family: var(--fwx-font-family, inherit);
	box-sizing: border-box;
}

.rwpx-widget *,
.rwpx-widget *::before,
.rwpx-widget *::after {
	box-sizing: border-box;
}

.rwpx-widget button,
.rwpx-widget input[type="button"],
.rwpx-widget input[type="submit"] {
	box-sizing: border-box;
	font-family: inherit;
	letter-spacing: normal;
}

.rwpx-widget-title {
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	color: inherit;
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--fwx-primary, #10b981);
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ==========================================================================
   2. Widget de Receitas Recentes
   ========================================================================== */
.rwpx-recent-recipes-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rwpx-recent-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 0;
	background: transparent;
	border: none;
	transition: all 0.2s ease-in-out;
}

.rwpx-recent-item:hover {
	border-color: #cbd5e1;
	transform: translateY(-1px);
}

/* Miniatura com suporte a srcset nativo */
.rwpx-recent-thumb-wrap {
	flex-shrink: 0;
	width: 68px;
	height: 68px;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f5f9;
	position: relative;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rwpx-widget-thumb-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.3s ease;
}

.rwpx-recent-item:hover .rwpx-widget-thumb-img {
	transform: scale(1.06);
}

/* Placeholder para quando não houver imagem destacada */
.rwpx-recent-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	color: #94a3b8;
}

.rwpx-recent-placeholder svg {
	width: 32px;
	height: 32px;
	fill: currentColor;
}

/* Conteúdo da Receita */
.rwpx-recent-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rwpx-recent-title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.rwpx-recent-title a {
	color: var(--fwx-text-color, #1e293b);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s ease;
}

.rwpx-recent-title a:hover {
	color: var(--fwx-primary, #059669);
}

/* Badges e Métricas da Receita */
.rwpx-recent-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: #64748b;
	margin-top: 2px;
}

.rwpx-widget-diff-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1.2;
}

.rwpx-diff-facil {
	background: #dcfce7;
	color: #166534;
}

.rwpx-diff-medio {
	background: #e0f2fe;
	color: #075985;
}

.rwpx-diff-dificil {
	background: #fee2e2;
	color: #991b1b;
}

.rwpx-widget-time {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-weight: 500;
}

.rwpx-widget-rating {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-weight: 700;
	color: #d97706;
}

.rwpx-widget-star {
	color: #f59e0b;
	font-size: 12px;
}

/* ==========================================================================
   3. Widget de Filtro de Pesquisa Avançado
   ========================================================================== */
.rwpx-filter-recipes-widget {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.rwpx-filter-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rwpx-filter-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rwpx-filter-label {
	font-size: 11px;
	font-weight: 700;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* Campo de Busca por Texto */
.rwpx-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.rwpx-search-icon {
	position: absolute;
	left: 10px;
	width: 15px;
	height: 15px;
	fill: #94a3b8;
	pointer-events: none;
}

.rwpx-filter-input {
	width: 100% !important;
	padding: 8px 12px 8px 32px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	color: #1e293b !important;
	background: #f8fafc !important;
	outline: none !important;
	transition: all 0.2s ease !important;
}

.rwpx-filter-input:focus {
	border-color: #10b981 !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15) !important;
}

/* Selects */
.rwpx-filter-select {
	width: 100% !important;
	padding: 8px 10px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	color: #1e293b !important;
	background: #f8fafc !important;
	outline: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
}

.rwpx-filter-select:focus {
	border-color: #10b981 !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15) !important;
}

/* Pílulas de Dificuldade */
.rwpx-diff-pills {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
}

.rwpx-diff-pill-radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rwpx-diff-pill-label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 2px;
	font-size: 11px;
	font-weight: 600;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #f8fafc;
	color: #475569;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: center;
	user-select: none;
}

.rwpx-diff-pill-label:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.rwpx-diff-pill-radio:checked+.rwpx-diff-pill-label {
	background: #059669;
	color: #ffffff;
	border-color: #059669;
	font-weight: 700;
	box-shadow: 0 1px 4px rgba(5, 150, 105, 0.3);
}

/* Botões de Ação do Filtro */
.rwpx-filter-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 6px;
}

.rwpx-widget .rwpx-btn-filter,
.rwpx-btn-filter {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	width: 100% !important;
	padding: 10px 14px !important;
	background: linear-gradient(135deg, var(--fwx-primary, #059669) 0%, #047857 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: var(--fwx-rad-4, 6px) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25) !important;
	text-decoration: none !important;
	min-height: 0 !important;
	line-height: normal !important;
}

.rwpx-widget .rwpx-btn-filter:hover,
.rwpx-btn-filter:hover {
	background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(5, 150, 105, 0.35) !important;
	color: #ffffff !important;
}

.rwpx-btn-clear-filters {
	display: block;
	text-align: center;
	font-size: 12px;
	color: #64748b;
	text-decoration: none;
	padding: 4px;
	transition: color 0.15s ease;
}

.rwpx-btn-clear-filters:hover {
	color: #ef4444;
	text-decoration: underline;
}

/* ==========================================================================
   4. Responsividade e Layout do Template Single de Receitas
   ========================================================================== */
.rwpx-single-recipe-container.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 40px;
	align-items: start;
	max-width: 1140px;
	margin: 30px auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.rwpx-single-recipe-container.no-sidebar {
	display: block;
	max-width: 760px;
	margin: 30px auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.rwpx-single-content {
	width: 100%;
	min-width: 0;
}

.rwpx-sidebar-area {
	width: 100%;
	min-width: 0;
}

.rwpx-cat-label-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.rwpx-cat-pill {
	display: inline-block;
	background: #10b981;
	color: #ffffff !important;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
	transition: background 0.2s ease;
}

.rwpx-cat-pill:hover {
	background: #059669;
}

.rwpx-recipe-main-title {
	font-size: 2rem;
	line-height: 1.25;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 14px 0;
}

.rwpx-single-meta {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 20px;
}

.rwpx-single-hero-thumb {
	margin-bottom: 28px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rwpx-single-featured-image {
	width: 100% !important;
	height: auto !important;
	display: block !important;
	object-fit: cover !important;
}

@media (max-width: 991px) {
	.rwpx-single-recipe-container.has-sidebar {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 480px) {
	.rwpx-diff-pills {
		grid-template-columns: repeat(2, 1fr);
	}
	.rwpx-recipe-main-title {
		font-size: 1.6rem;
	}
}