/**
 * Recipe Ecosystem Pro — estilos do front-end.
 *
 * Estrutura:
 *   1. Base do cartão (variáveis CSS)
 *   2. Componentes (avaliação, botões, grade de infos, ingredientes,
 *      instruções, nutrição, modo cozinha, modal, toast…)
 *   3. Temas dos 5 templates (modern, classic, minimalist, elegant, bold)
 *   4. Índice de receitas, responsivo e impressão
 */

/* ============================================
   1. BASE
   ============================================ */
.wpre-recipe-card {
    --wpre-accent: #b9553d;
    --wpre-card-bg: #ffffff;
    --wpre-section-bg: #faf6ec;
    --wpre-text-color: #33383e;
    --wpre-muted-color: #6b7280;
    --wpre-heading-color: #21262c;
    --wpre-heading-font: inherit;
    --wpre-heading-transform: none;
    --wpre-border-color: #e5e2d9;
    --wpre-radius: 14px;
    --wpre-star-color: #f5a623;
    --wpre-footer-icon-color: var(--wpre-accent);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    margin: 2rem auto;
    background: var(--wpre-card-bg);
    color: var(--wpre-text-color);
    border-radius: var(--wpre-radius);
    border: 1px solid var(--wpre-border-color);
    box-shadow: 0 6px 24px rgba(25, 22, 12, 0.07);
    overflow: hidden;
}

.wpre-card-body {
    padding: 1.75rem 2rem 2rem;
}

.wpre-recipe-title {
    font-family: var(--wpre-heading-font);
    font-size: 2rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
    text-transform: var(--wpre-heading-transform);
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

.wpre-recipe-description {
    color: var(--wpre-muted-color);
    font-size: 1.05rem;
    margin: 1rem 0;
}

.wpre-section-title {
    font-family: var(--wpre-heading-font);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
    text-transform: var(--wpre-heading-transform);
    margin: 0 0 1.1rem;
}

.wpre-recipe-section {
    margin: 1.9rem 0 0;
}

.wpre-recipe-image {
    position: relative;
}

.wpre-recipe-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    margin: 0;
}

.wpre-icon {
    vertical-align: -0.18em;
    flex-shrink: 0;
}

/* Texto somente para leitores de tela (a página de impressão não carrega o tema). */
.wpre-recipe-card .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* ============================================
   2. COMPONENTES
   ============================================ */

/* --- Byline e termos (curso / cozinha / dificuldade) --- */
.wpre-byline {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    color: var(--wpre-muted-color);
    font-style: italic;
}

.wpre-byline span,
.wpre-byline strong {
    font-style: normal;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-terms-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--wpre-border-color);
    border-bottom: 1px solid var(--wpre-border-color);
    font-size: 0.9rem;
    color: var(--wpre-muted-color);
}

.wpre-terms-line strong {
    color: var(--wpre-heading-color);
}

/* --- Avaliação (estrelas) --- */
.wpre-recipe-rating {
    margin: 0.6rem 0;
}

.wpre-rating-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

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

.wpre-star {
    font-size: 1.4rem;
    color: #d8d8d8;
}

.wpre-star.filled {
    color: var(--wpre-star-color);
}

.wpre-star.half {
    color: var(--wpre-star-color);
    background: linear-gradient(90deg, var(--wpre-star-color) 50%, #d8d8d8 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wpre-rating-count {
    color: var(--wpre-muted-color);
    font-size: 0.88rem;
    font-style: italic;
}

.wpre-rating-average {
    font-weight: 800;
    color: var(--wpre-heading-color);
}

.wpre-comment-stars {
    display: block;
    margin-bottom: 4px;
}

.wpre-comment-stars .wpre-star {
    font-size: 1.05rem;
}

/* Estrelas de seleção (formulário de comentários) */
.wpre-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.wpre-stars-input input {
    display: none;
}

.wpre-stars-input label {
    font-size: 1.9rem;
    color: #d8d8d8;
    cursor: pointer;
    transition: color 0.15s;
}

.wpre-stars-input label:hover,
.wpre-stars-input label:hover ~ label,
.wpre-stars-input input:checked ~ label {
    color: var(--wpre-star-color, #f5a623);
}

/* --- Botões --- */
.wpre-recipe-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 1.1rem 0;
}

.wpre-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.15rem;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 8px;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.wpre-btn:hover {
    border-color: var(--wpre-accent);
    color: var(--wpre-accent);
    transform: translateY(-1px);
}

.wpre-actions-pill {
    justify-content: center;
}

.wpre-actions-pill .wpre-btn {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
    border-radius: 8px;
    padding: 0.7rem 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

.wpre-actions-pill .wpre-btn:hover {
    filter: brightness(0.94);
    color: #fff;
}

.wpre-actions-inline {
    gap: 0.5rem;
}

.wpre-actions-inline .wpre-btn {
    border: 0;
    padding: 0.35rem 0.6rem;
    background: transparent;
    color: var(--wpre-muted-color);
    font-size: 0.85rem;
}

.wpre-actions-inline .wpre-btn:hover {
    color: var(--wpre-accent);
    transform: none;
}

.wpre-btn-save.is-saved {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
}

/* --- Botões sobre a imagem (Pin / Imprimir) --- */
.wpre-image-overlay-actions {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    gap: 8px;
}

.wpre-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    line-height: 1;
}

.wpre-overlay-pin {
    background: #c8332b;
}

.wpre-overlay-print {
    background: rgba(17, 17, 17, 0.85);
}

.wpre-overlay-btn:hover {
    filter: brightness(1.12);
    color: #fff;
}

/* --- Grade de infos com ícones (Porções / Preparo / Cozimento / Calorias) --- */
.wpre-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    border: 1px dashed var(--wpre-border-color);
    margin: 1.4rem 0;
}

.wpre-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
    padding: 1rem 0.6rem;
    border-left: 1px dashed var(--wpre-border-color);
}

.wpre-stat:first-child {
    border-left: 0;
}

.wpre-stat-icon {
    color: var(--wpre-muted-color);
}

.wpre-stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-stat-value {
    font-size: 0.9rem;
    color: var(--wpre-muted-color);
}

/* --- Linha Tempo total / Rendimento (estilo Tasty) --- */
.wpre-total-yield-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
    padding: 0.9rem 0;
    margin: 0.5rem 0 0;
    border-top: 1px solid var(--wpre-border-color);
    font-size: 0.95rem;
}

.wpre-tyl-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.wpre-tyl-item .wpre-icon {
    color: var(--wpre-accent);
}

.wpre-tyl-item em {
    font-style: normal;
    color: var(--wpre-accent);
    font-weight: 600;
}

/* --- Linha minimalista --- */
.wpre-minimal-meta {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    color: var(--wpre-muted-color);
    white-space: pre-wrap;
}

.wpre-minimal-rule {
    border: 0;
    border-top: 1px solid var(--wpre-heading-color);
    margin: 1.1rem 0 0;
}

/* --- Controle de porções --- */
.wpre-recipe-servings-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    margin: 1.2rem 0;
    background: var(--wpre-section-bg);
    border-radius: 10px;
    font-size: 0.92rem;
}

.wpre-recipe-servings-control > label {
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-servings-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wpre-servings-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 50%;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
}

.wpre-servings-btn:hover {
    border-color: var(--wpre-accent);
    color: var(--wpre-accent);
}

.wpre-servings-input {
    width: 54px;
    text-align: center;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 8px;
    padding: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
}

.wpre-scale-buttons {
    display: inline-flex;
    gap: 6px;
}

.wpre-scale-btn {
    min-width: 40px;
    min-height: 32px;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 999px;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
}

.wpre-scale-btn.is-active,
.wpre-scale-btn:hover {
    border-color: var(--wpre-accent);
    background: var(--wpre-accent);
    color: #fff;
}

.wpre-unit-system {
    margin-left: auto;
    padding: 0.4rem 0.7rem;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 8px;
    font-size: 0.88rem;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
}

/* --- Ingredientes --- */
.wpre-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpre-ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 1rem;
}

.wpre-ingredient-item:last-child {
    border-bottom: 0;
}

.wpre-ingredient-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 0.15rem;
    color: var(--wpre-accent);
}

.wpre-ingredient-icon svg {
    width: 100%;
    height: 100%;
}

.wpre-ingredient-text {
    flex: 1;
}

.wpre-ingredient-amount {
    font-weight: 700;
    color: var(--wpre-accent);
}

.wpre-ingredient-unit {
    color: var(--wpre-text-color);
    font-weight: 600;
}

.wpre-ingredient-check-label {
    display: inline-flex;
    align-items: center;
    padding-top: 0.2rem;
}

.wpre-ingredient-check {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--wpre-accent);
    cursor: pointer;
}

.wpre-ingredient-bullet {
    width: 11px;
    height: 11px;
    margin-top: 0.5rem;
    border: 2px solid var(--wpre-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.wpre-ingredient-item.is-checked .wpre-ingredient-text {
    opacity: 0.5;
    text-decoration: line-through;
}

.wpre-marker-plain .wpre-ingredient-item {
    border-bottom: 0;
    padding: 0.28rem 0;
}

/* Painel destacado (ex.: fundo creme no template moderno) */
.wpre-section-panel {
    background: var(--wpre-section-bg);
    border-radius: 10px;
    padding: 1.4rem 1.6rem 1.6rem;
}

.wpre-list-section-title {
    list-style: none;
    margin: 1rem 0 0.3rem;
    padding: 0.4rem 0;
    color: var(--wpre-heading-color);
    font-weight: 800;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--wpre-border-color);
}

/* --- Instruções --- */
.wpre-instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpre-instruction-item {
    margin-bottom: 1.35rem;
}

.wpre-instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.wpre-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--wpre-accent);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.wpre-numbers-plain .wpre-step-number {
    background: transparent;
    color: var(--wpre-heading-color);
    font-size: 1.15rem;
    width: 28px;
    height: auto;
    justify-content: flex-start;
}

.wpre-step-body {
    flex: 1;
}

.wpre-step-heading {
    display: block;
    margin-bottom: 4px;
    color: var(--wpre-heading-color);
}

.wpre-step-text {
    margin: 0;
    line-height: 1.65;
}

.wpre-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding: 0.35rem 0.8rem;
    background: var(--wpre-section-bg);
    border: 1px solid var(--wpre-border-color);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--wpre-heading-color);
    cursor: pointer;
    transition: all 0.15s;
}

.wpre-timer-btn:hover,
.wpre-timer-btn.is-running {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
}

/* --- Nutrição: grade --- */
.wpre-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.8rem;
}

.wpre-nutrition-item {
    text-align: center;
    padding: 0.8rem 0.5rem;
    background: var(--wpre-section-bg);
    border-radius: 8px;
}

.wpre-nutrition-label {
    display: block;
    font-size: 0.78rem;
    color: var(--wpre-muted-color);
    margin-bottom: 0.25rem;
}

.wpre-nutrition-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
}

/* --- Nutrição: tabela em estilo rótulo --- */
.wpre-nutrition-facts {
    margin-top: 1.6rem;
    background: var(--wpre-section-bg);
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    font-size: 0.85rem;
}

.wpre-nutrition-facts-title {
    font-family: var(--wpre-heading-font);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
    margin: 0 0 0.4rem;
}

.wpre-nutrition-serving {
    margin: 0 0 0.5rem;
    color: var(--wpre-muted-color);
}

.wpre-nutrition-facts table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wpre-nutrition-facts th,
.wpre-nutrition-facts td {
    padding: 0.32rem 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 0.85rem;
    background: transparent;
}

.wpre-nutrition-facts th {
    text-align: left;
    font-weight: 500;
    color: var(--wpre-muted-color);
}

.wpre-nutrition-facts td {
    text-align: right;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

/* --- Vídeo --- */
.wpre-video-embed {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.wpre-video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
}

.wpre-video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.2s;
}

.wpre-video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
}

/* --- Equipamentos (linha ícone + nome + comprar, referência: imagem 12) --- */
.wpre-equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.wpre-equipment-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    background: var(--wpre-card-bg);
}

.wpre-equipment-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--wpre-section-bg);
    color: var(--wpre-accent);
}

.wpre-equipment-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpre-equipment-row-icon svg {
    width: 26px;
    height: 26px;
}

.wpre-equipment-row-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wpre-equipment-row-title {
    color: var(--wpre-heading-color);
    font-size: 0.92rem;
}

.wpre-equipment-row-price {
    font-weight: 700;
    color: var(--wpre-accent);
    font-size: 0.8rem;
}

.wpre-equipment-row-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--wpre-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.wpre-equipment-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--wpre-card-bg);
}

.wpre-equipment-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.wpre-equipment-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem;
}

.wpre-equipment-card-title {
    color: var(--wpre-heading-color);
    font-size: 0.95rem;
}

.wpre-equipment-card-price {
    font-weight: 700;
    color: var(--wpre-accent);
    font-size: 0.88rem;
}

.wpre-equipment-card-cta {
    justify-content: center;
    margin-top: 0.35rem;
}

/* --- Notas / alérgenos --- */
.wpre-notes-content {
    background: var(--wpre-section-bg);
    border-left: 4px solid var(--wpre-accent);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
}

.wpre-notes-content p:last-child {
    margin-bottom: 0;
}

.wpre-allergens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.wpre-allergen-tag {
    padding: 0.4rem 0.9rem;
    background: #fdeceb;
    color: #b3382c;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Modo Cozinha --- */
.wpre-cook-mode {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.6rem 0 0.4rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    font-size: 0.92rem;
}

.wpre-cook-mode-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.wpre-cook-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wpre-cook-mode-slider {
    position: absolute;
    inset: 0;
    background: #cfcfcf;
    border-radius: 999px;
    transition: background 0.2s;
}

.wpre-cook-mode-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.wpre-cook-mode-toggle:checked + .wpre-cook-mode-slider {
    background: var(--wpre-accent);
}

.wpre-cook-mode-toggle:checked + .wpre-cook-mode-slider::before {
    transform: translateX(20px);
}

.wpre-cook-mode-text strong {
    color: var(--wpre-heading-color);
}

/* --- Convite de avaliação --- */
.wpre-feedback-cta {
    text-align: center;
    margin: 2rem 0 0.5rem;
    padding: 1.6rem;
    background: var(--wpre-section-bg);
    border-radius: 10px;
}

.wpre-feedback-title {
    font-family: var(--wpre-heading-font);
    font-size: 1.4rem;
    color: var(--wpre-heading-color);
    margin: 0 0 0.8rem;
}

/* --- Rodapé social --- */
.wpre-social-footer {
    margin: 2rem -2rem -2rem;
    padding: 1.6rem 2rem;
    background: var(--wpre-section-bg);
}

.wpre-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpre-social-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 2px solid var(--wpre-footer-icon-color);
    border-radius: 999px;
    color: var(--wpre-footer-icon-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
}

/* --- Duas colunas (minimalist / elegant) --- */
.wpre-two-columns {
    display: grid;
    grid-template-columns: minmax(230px, 2fr) 3fr;
    gap: 2.4rem;
    margin-top: 0.6rem;
}

/* --- Modal de avaliação --- */
.wpre-rating-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 16px;
}

.wpre-modal-content {
    background: #fff;
    color: #33383e;
    padding: 2rem;
    border-radius: 12px;
    max-width: 460px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow: auto;
}

.wpre-modal-content h3 {
    margin: 0 0 0.6rem;
    color: #21262c;
}

.wpre-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    border: 0;
    background: none;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.wpre-rating-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1rem;
}

.wpre-stars-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.4rem;
}

.wpre-stars-rating input {
    display: none;
}

.wpre-stars-rating label {
    font-size: 2.4rem;
    color: #d8d8d8;
    cursor: pointer;
    transition: color 0.15s;
}

.wpre-stars-rating label:hover,
.wpre-stars-rating label:hover ~ label,
.wpre-stars-rating input:checked ~ label {
    color: var(--wpre-star-color, #f5a623);
}

.wpre-rating-form input,
.wpre-rating-form textarea {
    padding: 0.7rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.wpre-rating-form input:focus,
.wpre-rating-form textarea:focus {
    outline: none;
    border-color: var(--wpre-accent, #b9553d);
}

.wpre-btn-submit {
    background: var(--wpre-accent, #b9553d);
    border-color: var(--wpre-accent, #b9553d);
    color: #fff;
    padding: 0.85rem;
    font-size: 1rem;
}

.wpre-btn-submit:hover {
    filter: brightness(0.94);
    color: #fff;
}

/* --- Toast de notificação --- */
.wpre-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(8px);
    background: #21262c;
    color: #fff;
    padding: 0.75rem 1.3rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-width: min(92vw, 480px);
    text-align: center;
}

.wpre-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Atalhos acima do conteúdo --- */
.wpre-recipe-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px auto;
    max-width: 800px;
}

/* ============================================
   3. TEMAS DOS TEMPLATES
   ============================================ */

/* ---------- MODERNO (imagem 7 — WP Delicious) ---------- */
.wpre-template-modern {
    --wpre-accent: #b9553d;
    --wpre-section-bg: #fbf6e4;
    --wpre-radius: 10px;
}

.wpre-template-modern .wpre-recipe-title {
    font-size: 1.9rem;
    letter-spacing: -0.01em;
}

.wpre-template-modern .wpre-section-title {
    text-transform: uppercase;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
}

.wpre-template-modern .wpre-ingredients-section.wpre-section-panel .wpre-ingredient-item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.wpre-template-modern .wpre-numbers-plain .wpre-step-number {
    font-weight: 800;
}

/* ---------- CLÁSSICO (imagem 5 — Tasty) ---------- */
.wpre-template-classic {
    --wpre-accent: #f09422;
    --wpre-star-color: #f5a623;
    --wpre-teal: #2ec4b6;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-section-bg: #fdf8ef;
    --wpre-radius: 22px;
    border-width: 1px;
}

.wpre-template-classic .wpre-recipe-header {
    text-align: center;
}

.wpre-template-classic .wpre-recipe-title {
    font-size: 2.15rem;
    font-weight: 700;
}

.wpre-template-classic .wpre-recipe-description {
    font-style: italic;
    text-align: left;
}

.wpre-template-classic .wpre-total-yield-line .wpre-tyl-item .wpre-icon,
.wpre-template-classic .wpre-total-yield-line em {
    color: var(--wpre-teal);
}

.wpre-template-classic .wpre-ingredients-section .wpre-section-title,
.wpre-template-classic .wpre-instructions-section .wpre-section-title {
    color: var(--wpre-accent);
    font-size: 1.5rem;
    text-align: left;
}

.wpre-template-classic .wpre-recipe-image img {
    height: 400px;
}

/* ---------- MINIMALISTA (imagem 11 — página impressa) ---------- */
.wpre-template-minimalist {
    --wpre-accent: #22262a;
    --wpre-section-bg: #fafafa;
    --wpre-border-color: #dedede;
    --wpre-muted-color: #7a7a7a;
    --wpre-radius: 0;
    box-shadow: none;
    max-width: 760px;
}

.wpre-template-minimalist .wpre-card-body {
    padding: 2.6rem 3rem 2.4rem;
}

.wpre-template-minimalist .wpre-recipe-header {
    text-align: center;
}

.wpre-template-minimalist .wpre-recipe-title {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.wpre-template-minimalist .wpre-recipe-image {
    margin: 1.6rem auto;
}

.wpre-template-minimalist .wpre-recipe-image img {
    height: 340px;
}

.wpre-template-minimalist .wpre-recipe-description {
    text-align: center;
    font-size: 0.95rem;
}

.wpre-template-minimalist .wpre-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wpre-template-minimalist .wpre-ingredient-item,
.wpre-template-minimalist .wpre-step-text {
    font-size: 0.92rem;
    color: #44484c;
}

.wpre-template-minimalist .wpre-ingredient-amount {
    color: #22262a;
}

.wpre-template-minimalist .wpre-instruction-item {
    margin-bottom: 0.9rem;
}

.wpre-template-minimalist .wpre-column-ingredients .wpre-recipe-section,
.wpre-template-minimalist .wpre-column-instructions .wpre-recipe-section {
    margin-top: 1rem;
}

.wpre-template-minimalist .wpre-actions-inline {
    justify-content: center;
    margin-top: 2rem;
}

/* ---------- EDITORIAL / ELEGANTE (imagem 8 — Tastebite) ---------- */
.wpre-template-elegant {
    --wpre-accent: #f26b3a;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-section-bg: #f7f7f5;
    --wpre-border-color: #e8e8e4;
    --wpre-radius: 8px;
    max-width: 860px;
    box-shadow: none;
}

.wpre-template-elegant .wpre-card-body {
    padding: 2.4rem 2.6rem;
}

.wpre-template-elegant .wpre-recipe-title {
    font-size: 2.3rem;
    font-weight: 700;
}

.wpre-template-elegant .wpre-editorial-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.2rem;
    font-size: 0.85rem;
    color: var(--wpre-muted-color);
    margin-bottom: 0.4rem;
}

.wpre-template-elegant .wpre-recipe-image {
    margin: 1.2rem 0;
}

.wpre-template-elegant .wpre-recipe-image img {
    height: 430px;
    border-radius: 8px;
}

.wpre-editorial-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--wpre-border-color);
    border-bottom: 1px solid var(--wpre-border-color);
    margin: 0.6rem 0 1.2rem;
}

.wpre-editorial-chip {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.3;
}

.wpre-chip-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wpre-muted-color);
}

.wpre-chip-value {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--wpre-heading-color);
}

.wpre-editorial-toolbar .wpre-recipe-actions {
    margin: 0 0 0 auto;
}

.wpre-template-elegant .wpre-section-title {
    font-size: 1.3rem;
}

.wpre-template-elegant .wpre-column-ingredients .wpre-recipe-section {
    margin-top: 0.6rem;
}

.wpre-template-elegant .wpre-column-instructions .wpre-recipe-section {
    margin-top: 0.6rem;
}

.wpre-template-elegant .wpre-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.wpre-template-elegant .wpre-recipe-servings-control {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    gap: 0.55rem;
}

.wpre-template-elegant .wpre-unit-system {
    margin-left: 0;
}

/* ---------- VIBRANTE (imagem 4 — estilos Vibrant/Amber) ---------- */
.wpre-template-bold {
    --wpre-accent: #ffc531;
    --wpre-card-bg: #17181c;
    --wpre-section-bg: #22242a;
    --wpre-text-color: #d9dadf;
    --wpre-muted-color: #9ca1ab;
    --wpre-heading-color: #ffffff;
    --wpre-border-color: #33353d;
    --wpre-star-color: #ffc531;
    --wpre-radius: 16px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

.wpre-bold-hero {
    position: relative;
}

.wpre-bold-hero .wpre-recipe-image img {
    height: 470px;
    opacity: 0.85;
}

.wpre-bold-hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3.4rem 2rem 1.4rem;
    background: linear-gradient(180deg, rgba(23, 24, 28, 0), rgba(23, 24, 28, 0.94));
}

.wpre-bold-kicker {
    display: inline-block;
    background: var(--wpre-accent);
    color: #17181c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.6rem;
}

.wpre-template-bold .wpre-bold-hero .wpre-recipe-title {
    color: #fff;
    margin-bottom: 0.2rem;
}

.wpre-template-bold .wpre-stats-grid {
    background: var(--wpre-accent);
    border: 0;
    margin: 0;
}

.wpre-template-bold .wpre-stat {
    border-left-color: rgba(23, 24, 28, 0.25);
}

.wpre-template-bold .wpre-stat-icon,
.wpre-template-bold .wpre-stat-label,
.wpre-template-bold .wpre-stat-value {
    color: #17181c;
}

.wpre-template-bold .wpre-step-number {
    color: #17181c;
}

.wpre-template-bold .wpre-btn {
    background: transparent;
    color: #fff;
}

.wpre-template-bold .wpre-btn:hover {
    color: var(--wpre-accent);
}

.wpre-template-bold .wpre-actions-pill .wpre-btn,
.wpre-template-bold .wpre-btn-submit {
    background: var(--wpre-accent);
    color: #17181c;
}

.wpre-template-bold .wpre-scale-btn,
.wpre-template-bold .wpre-servings-btn,
.wpre-template-bold .wpre-servings-input,
.wpre-template-bold .wpre-unit-system {
    background: var(--wpre-section-bg);
    color: #fff;
}

.wpre-template-bold .wpre-scale-btn.is-active,
.wpre-template-bold .wpre-scale-btn:hover {
    background: var(--wpre-accent);
    color: #17181c;
}

.wpre-template-bold .wpre-allergen-tag {
    background: #3a2326;
    color: #ff9b8f;
}

.wpre-template-bold .wpre-notes-content,
.wpre-template-bold .wpre-nutrition-item,
.wpre-template-bold .wpre-nutrition-facts,
.wpre-template-bold .wpre-equipment-row,
.wpre-template-bold .wpre-recipe-servings-control,
.wpre-template-bold .wpre-feedback-cta,
.wpre-template-bold .wpre-social-footer {
    background: var(--wpre-section-bg);
}

/* ============================================
   4. ÍNDICE, RESPONSIVO E IMPRESSÃO
   ============================================ */
.wpre-recipe-search-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 180px)) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 24px;
}

.wpre-recipe-search-form input,
.wpre-recipe-search-form select {
    width: 100%;
    min-height: 40px;
}

.wpre-recipe-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.wpre-recipe-index-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.wpre-recipe-index-card a {
    color: inherit;
    text-decoration: none;
}

.wpre-recipe-index-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.wpre-recipe-index-card h3,
.wpre-recipe-index-card p {
    padding: 0 14px;
}

@media (max-width: 768px) {
    .wpre-recipe-card {
        margin: 1rem auto;
    }

    .wpre-card-body {
        padding: 1.2rem 1.1rem 1.4rem;
    }

    .wpre-template-minimalist .wpre-card-body,
    .wpre-template-elegant .wpre-card-body {
        padding: 1.4rem 1.2rem;
    }

    .wpre-recipe-image img,
    .wpre-template-classic .wpre-recipe-image img,
    .wpre-bold-hero .wpre-recipe-image img,
    .wpre-template-elegant .wpre-recipe-image img,
    .wpre-template-minimalist .wpre-recipe-image img {
        height: 250px;
    }

    .wpre-recipe-title {
        font-size: 1.5rem;
    }

    .wpre-template-classic .wpre-recipe-title,
    .wpre-template-elegant .wpre-recipe-title {
        font-size: 1.65rem;
    }

    .wpre-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wpre-stat:nth-child(2n+1) {
        border-left: 0;
    }

    .wpre-stat {
        border-top: 1px dashed var(--wpre-border-color);
    }

    .wpre-stat:nth-child(-n+2) {
        border-top: 0;
    }

    .wpre-two-columns {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .wpre-recipe-actions {
        flex-direction: row;
    }

    .wpre-btn {
        flex: 1 1 calc(50% - 0.7rem);
    }

    .wpre-actions-inline .wpre-btn {
        flex: 0 1 auto;
    }

    .wpre-recipe-servings-control {
        gap: 0.6rem;
    }

    .wpre-unit-system {
        margin-left: 0;
        width: 100%;
    }

    .wpre-editorial-toolbar .wpre-recipe-actions {
        margin-left: 0;
    }

    .wpre-social-footer {
        margin: 2rem -1.1rem -1.4rem;
        padding: 1.4rem 1.2rem;
    }

    .wpre-recipe-search-form {
        grid-template-columns: 1fr;
    }
}

@media print {
    .wpre-recipe-actions,
    .wpre-recipe-servings-control,
    .wpre-timer-btn,
    .wpre-cook-mode,
    .wpre-feedback-cta,
    .wpre-rating-modal,
    .wpre-image-overlay-actions,
    .wpre-social-footer,
    .wpre-recipe-shortcuts {
        display: none !important;
    }

    .wpre-recipe-card {
        box-shadow: none;
        border: 1px solid #bbb;
        max-width: none;
        margin: 0;
    }

    .wpre-recipe-image img {
        max-height: 220px;
        height: auto;
    }

    .wpre-recipe-section,
    .wpre-instruction-item,
    .wpre-ingredient-item {
        break-inside: avoid;
    }
}
