/**
 * Recipe Layout Styles
 * @package AtualReceitas
 * @version 1.0.26
 */

.single-recipe .recipe-header {
    margin-bottom: 2rem;
}


/*
 * Corrige sobreposicao do badge de categoria com breadcrumbs no desktop.
 * O .recipe-category e absoluto por padrao (usado em cards), mas no single
 * ele deve fluir no layout.
 */
.single-recipe .recipe-header .recipe-category {
    position: static;
    margin: 0 0 0.75rem 0;
}

.single-recipe .recipe-header .entry-title {
    font-size: clamp(1.9rem, 3.8vw, 2.5rem);
    margin: 0 0 0.75rem 0;
}

.single-recipe .recipe-header .entry-meta {
    color: var(--text-light);
    font-weight: 500;
}

/* Resumo compacto no topo (Etapa 7.3) */
.ar-top-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
    text-decoration: none;
    color: inherit;
}

.ar-top-rating:hover {
    text-decoration: underline;
}

.ar-top-rating-stars {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
}

.ar-top-rating-meta {
    display: inline-flex;
    gap: 0.35rem;
    align-items: baseline;
    color: var(--text-light);
    font-weight: 700;
}

.ar-top-rating-value {
    color: var(--text);
    font-weight: 900;
}

.ar-top-rating-empty {
    color: var(--text-light);
}

/* ========== Ratings (Etapa 7.1) ========== */
.ar-rating {
    margin-top: 0.75rem;
}

.ar-rating-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ar-rating-stars {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
}

.ar-star {
    font-size: 1.05rem;
    color: var(--border);
}

.ar-star.is-filled {
    color: var(--secondary);
}

.ar-star.is-half {
    background: linear-gradient(90deg, var(--secondary) 50%, var(--border) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ar-rating-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--text-light);
    font-weight: 600;
}

.ar-rating-value {
    color: var(--text);
    font-weight: 800;
}

.ar-rating-empty {
    color: var(--text-light);
}

.ar-rating-action {
    margin-top: 0.6rem;
}

.ar-rating-label {
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.ar-rating-input {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.ar-star-btn {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--border);
    transition: transform var(--transition);
}

.ar-star-btn:hover,
.ar-star-btn:focus {
    transform: translateY(-1px);
}

.ar-star-btn.is-hover,
.ar-star-btn.is-selected {
    color: var(--secondary);
}

.ar-star-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.ar-rating-feedback {
    margin-top: 0.35rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Breakdown (Etapa 7.2) */
.ar-rating-breakdown {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.35rem;
    max-width: 520px;
}

.ar-breakdown-row {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0.55rem;
}

.ar-breakdown-label {
    color: var(--text-light);
    font-weight: 800;
    font-size: 0.9rem;
}

.ar-breakdown-bar {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--neutral);
    border: 1px solid var(--border);
    overflow: hidden;
}

.ar-breakdown-fill {
    display: block;
    height: 100%;
    width: calc(var(--p) * 1%);
    background: var(--secondary);
    border-radius: 999px;
    transition: width var(--transition);
}

.ar-breakdown-count {
    text-align: right;
    color: var(--text-light);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ar-rating-breakdown-note {
    margin: 0.65rem 0 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.single-recipe .recipe-image {
    margin-bottom: 2rem;
    position: relative;
}

.single-recipe .recipe-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Selo na imagem (Etapa 7.3) */
.ar-hero-badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.ar-hero-badge-stars {
    display: inline-flex;
    gap: 2px;
}

.ar-hero-badge-value {
    font-weight: 900;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.recipe-rating-section {
    margin: 2rem 0;
}

.recipe-rating-section h2 {
    font-size: 1.6rem;
    margin: 0 0 0.85rem 0;
}

/* Video */
.recipe-video {
    margin: 0 0 2rem;
}

.recipe-video h2 {
    font-size: 1.6rem;
    margin: 0 0 1rem 0;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--neutral);
}

.video-embed iframe,
.video-embed embed,
.video-embed object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.single-recipe .recipe-meta-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem;
    background: var(--neutral);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.single-recipe .recipe-meta-bar .meta-item {
    font-weight: 700;
    color: var(--text);
}

.single-recipe .recipe-meta-bar .meta-item span {
    font-weight: 600;
    color: var(--text-light);
}

.single-recipe .recipe-layout {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.ingredients-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.ingredients-box h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.ingredients-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredients-box li {
    margin-bottom: 0.75rem;
}

.ingredients-box label {
    display: flex;
    gap: 0.5rem;
    align-items: start;
    cursor: pointer;
}

.ingredients-box label.is-checked span {
    text-decoration: line-through;
    opacity: 0.6;
}

.recipe-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-action {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition);
}

.btn-action:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.recipe-intro,
.recipe-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.8;
}

.single-recipe .entry-content {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.recipe-instructions h2 {
    font-size: 2rem;
    margin: 0 0 1.25rem 0;
}

.recipe-instructions ol {
    padding-left: 1.25rem;
}

.recipe-instructions li {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Tags */
.recipe-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.recipe-tags strong {
    margin-right: 0.25rem;
}

.recipe-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--neutral);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

.recipe-tags a:hover {
    border-color: var(--primary);
}

/* Social share (antes estava inline no template) */
.social-share-buttons {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.share-title {
    font-size: 1.125rem;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #1fb855; }

.share-pinterest { background: #E60023; }
.share-pinterest:hover { background: #c50020; }

.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #0d65d9; }

.share-twitter { background: #1DA1F2; }
.share-twitter:hover { background: #0c8bd9; }

.share-copy { background: #636E72; }
.share-copy:hover { background: #4a5357; }

@media (max-width: 768px) {
    .single-recipe .recipe-layout {
        grid-template-columns: 1fr;
    }
    .recipe-main {
        order: 1;
    }
    .recipe-sidebar {
        position: static;
        order: 2;
    }
}
@media (max-width: 640px) {
    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* -----------------------------
   6.1 - Recipe UX improvements
------------------------------ */

/* Recipe nav (anchors) */
.recipe-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
}

.recipe-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--neutral);
    font-weight: 800;
    font-size: 0.875rem;
}

.recipe-nav a:hover {
    border-color: var(--primary);
}

/* Tips section */
.recipe-tips h2 {
    font-size: 1.6rem;
    margin: 0 0 1rem 0;
}

.recipe-tips {
    margin-bottom: 2rem;
}


/* -----------------------------
   6.2 - Sidebar rica (fallback)
------------------------------ */
.recipe-sidebar-widgets {
    margin-top: 1rem;
}

.recipe-side-section,
.recipe-sidebar .recipe-widget,
.recipe-sidebar .widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.recipe-side-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.recipe-mini-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.recipe-mini-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.recipe-mini-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.recipe-mini-body {
    min-width: 0;
}

.recipe-mini-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.25;
    font-size: 0.95rem;
    color: var(--text);
}

.recipe-mini-title:hover {
    color: var(--primary);
}

.recipe-mini-meta {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

/* ==========================================================
   Related Recipes (merged) - v1.0.32
   ========================================================== */

/**
 * Related Recipes Styles
 * @package AtualReceitas
 * @version 1.0.22
 */

/* ========== Container ========== */
.related-recipes {
	margin: 4rem 0 2rem 0;
	padding: 3rem 0;
	background: var(--neutral, #F8F9FA);
	border-top: 2px solid var(--border, #E0E0E0);
}

.related-recipes .container {
	max-width: var(--container-width, 1200px);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ========== Title ========== */
.related-recipes-title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--text, #2C3E50);
	margin: 0 0 2rem 0;
	text-align: center;
	position: relative;
	padding-bottom: 1rem;
}

.related-recipes-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 3px;
	background: var(--primary, #FF6B35);
	border-radius: 2px;
}

/* ========== Grid ========== */
.related-recipes-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

/* ========== Card ========== */
.related-recipe-card {
	background: var(--white, #FFFFFF);
	border-radius: var(--radius-md, 12px);
	overflow: hidden;
	box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.08));
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.related-recipe-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-lg, 0 12px 24px rgba(0,0,0,0.15));
}

/* ========== Thumbnail ========== */
.related-recipe-thumbnail {
	display: block;
	overflow: hidden;
	aspect-ratio: 4/3;
	position: relative;
}

.related-recipe-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.related-recipe-card:hover .related-recipe-thumbnail img {
	transform: scale(1.1);
}

/* ========== Content ========== */
.related-recipe-content {
	padding: 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* ========== Category Badge ========== */
.related-recipe-category {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	background: var(--primary, #FF6B35);
	color: var(--white, #FFFFFF);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: var(--radius-sm, 6px);
	align-self: flex-start;
}

/* ========== Title ========== */
.related-recipe-title {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	flex: 1;
}

.related-recipe-title a {
	color: var(--text, #2C3E50);
	text-decoration: none;
	transition: color 0.2s ease;
}

.related-recipe-title a:hover {
	color: var(--primary, #FF6B35);
}

/* ========== Meta ========== */
.related-recipe-meta {
	display: flex;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--text-light, #7F8C8D);
	padding-top: 0.75rem;
	border-top: 1px solid var(--border, #E0E0E0);
}

.related-recipe-meta .meta-item {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.related-recipe-meta svg {
	width: 16px;
	height: 16px;
	opacity: 0.7;
}

/* ========== Responsive ========== */

/* Tablet */
@media (max-width: 1024px) {
	.related-recipes-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

/* Mobile */
@media (max-width: 640px) {
	.related-recipes {
		margin: 3rem 0 1.5rem 0;
		padding: 2rem 0;
	}

	.related-recipes-title {
		font-size: 1.5rem;
		margin-bottom: 1.5rem;
	}

	.related-recipes-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.related-recipe-content {
		padding: 1.25rem;
	}

	.related-recipe-meta {
		flex-direction: column;
		gap: 0.5rem;
		align-items: flex-start;
	}
}


/* Tabela de nutriÃÂ§ÃÂ£o (Etapa 10.4) */
.recipe-nutrition {
    margin-top: 2rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
}

.recipe-nutrition h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}

.recipe-nutrition .nutrition-serving {
    margin: 0 0 0.75rem 0;
    color: var(--text-light);
}

.nutrition-table-wrapper {
    overflow-x: auto;
}

.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}

.nutrition-table th,
.nutrition-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.nutrition-table th {
    width: 60%;
    color: var(--text-dark);
    font-weight: 700;
}

.nutrition-table tr:last-child th,
.nutrition-table tr:last-child td {
    border-bottom: none;
}

.recipe-nutrition .nutrition-disclaimer {
    margin: 0.75rem 0 0 0;
    color: var(--text-light);
}
