/* ============================================================
   AI Blog Writer – Recipe Card Styles (Frontend)
   ============================================================ */

.aiw-recipe-card {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 32px;
    margin: 36px 0;
    background: #ffffff;
    font-family: inherit;
    max-width: 780px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Header ──────────────────────────────────────────────────── */
.aiw-rc-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

/* Recipe name — <h2> */
.aiw-rc-name.aiw-rc-name {   /* double class to increase specificity */
    font-size: 1.6em !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #1a1a2e !important;
    line-height: 1.2 !important;
    border: none !important;
}

.aiw-rc-description {
    color: #4b5563;
    margin: 0;
    font-size: 1em;
    line-height: 1.6;
}

/* ── Meta Grid ───────────────────────────────────────────────── */
.aiw-rc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.aiw-rc-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
}

.aiw-rc-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.aiw-rc-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

/* ── Section Titles — <h3> ───────────────────────────────────── */
.aiw-rc-section-title.aiw-rc-section-title {
    font-size: 1.15em !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 14px !important;
    padding: 0 0 8px !important;
    border-bottom: 2px solid #f97316 !important;  /* accent underline */
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── Sections ────────────────────────────────────────────────── */
.aiw-rc-section {
    margin-bottom: 28px;
}

.aiw-rc-section:last-child {
    margin-bottom: 0;
}

/* ── Ingredients ─────────────────────────────────────────────── */
.aiw-rc-list {
    list-style: disc;
    padding-left: 22px;
    margin: 0;
}

.aiw-rc-list li {
    padding: 5px 0;
    color: #374151;
    line-height: 1.5;
}

/* ── Instructions ────────────────────────────────────────────── */
.aiw-rc-steps {
    padding-left: 22px;
    margin: 0;
}

.aiw-rc-step {
    padding: 7px 0;
    color: #374151;
    line-height: 1.65;
}

.aiw-rc-step-title {
    font-weight: 700;
    color: #1f2937;
}

/* ── Notes ───────────────────────────────────────────────────── */
.aiw-rc-notes-list li {
    color: #4b5563;
    font-style: italic;
}

/* ── Nutrition ───────────────────────────────────────────────── */
.aiw-rc-nutrition-serving {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 13px;
}

.aiw-rc-nutrition-table {
    width: 100%;
    max-width: 420px;
    border-collapse: collapse;
    font-size: 14px;
}

.aiw-rc-nutrition-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.aiw-rc-nutrition-table tbody tr:first-child {
    border-top: 2px solid #e5e7eb;
}

.aiw-rc-nutrition-table tbody tr:last-child {
    border-bottom: 2px solid #e5e7eb;
}

.aiw-rc-nut-label,
.aiw-rc-nut-value {
    padding: 7px 8px;
    vertical-align: middle;
}

.aiw-rc-nut-label {
    font-weight: 600;
    color: #1f2937;
    width: 60%;
}

/* Calories row — make it stand out */
.aiw-rc-nutrition-table tbody tr:first-child .aiw-rc-nut-label,
.aiw-rc-nutrition-table tbody tr:first-child .aiw-rc-nut-value {
    font-size: 15px;
    font-weight: 700;
    padding-top: 10px;
    padding-bottom: 10px;
}

.aiw-rc-nut-value {
    text-align: right;
    color: #374151;
    font-variant-numeric: tabular-nums;
}

/* Sub-rows (saturated fat, fiber, sugar, etc.) — indented */
.aiw-rc-nut-sub .aiw-rc-nut-label {
    padding-left: 22px;
    font-weight: 400;
    color: #6b7280;
}

.aiw-rc-nut-sub .aiw-rc-nut-value {
    color: #6b7280;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .aiw-recipe-card {
        padding: 18px 16px;
    }

    .aiw-rc-meta {
        gap: 8px;
    }

    .aiw-rc-meta-item {
        min-width: 75px;
        padding: 8px 10px;
    }

    .aiw-rc-nutrition-table {
        max-width: 100%;
    }
}
