/* ---- Recipe Nutrition Calculator Custom Styling ---- */

.recipe-workarea {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .recipe-workarea {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ---- Disclaimer Banner ---- */
.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-s);
    margin-bottom: 24px;
    font-size: 13.5px;
    line-height: 1.5;
    background: var(--surface);
    border: 2px solid var(--line-2);
}
.disclaimer-banner .icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}
.disclaimer-banner p {
    margin: 0;
    color: var(--muted);
}
.disclaimer-banner p b {
    color: var(--ink);
}

/* ---- Macro Ratio Bar Chart ---- */
.macro-ratio-bar {
    height: 14px;
    border-radius: 7px;
    background: var(--surface-2);
    border: 2px solid var(--line-2);
    overflow: hidden;
    display: flex;
}
.ratio-segment {
    height: 100%;
    transition: width 0.3s var(--ease);
}
.ratio-segment.protein { background: #3b82f6; }
.ratio-segment.carbs { background: #10b981; }
.ratio-segment.fat { background: #f59e0b; }

/* ---- Custom Ingredient List ---- */
.custom-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--r-xs);
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 13px;
}
.custom-item-row .name {
    font-weight: 600;
    color: var(--ink);
}
.custom-item-row .details {
    font-size: 11.5px;
    color: var(--muted);
    font-family: var(--font-mono);
}
.custom-item-row .remove-btn {
    background: none;
    border: none;
    color: var(--neg);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

/* ---- Warnings & Unmatched review ---- */
.review-warning-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--warn);
    background: color-mix(in oklab, var(--warn) 8%, transparent);
    border: 1px dashed color-mix(in oklab, var(--warn) 30%, transparent);
    padding: 10px 12px;
    border-radius: var(--r-xs);
}
.review-warning-item .icon {
    font-size: 15px;
}
.review-warning-item .action-links {
    margin-top: 4px;
    display: flex;
    gap: 8px;
}
.review-warning-item .action-btn {
    font-size: 11px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* ---- Estimated Nutrition Facts Label Card ---- */
.label-card {
    background: #fff !important; /* Always white background for classic nutrition facts label contrast */
    color: #000 !important; /* Always black text */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    border: 2px solid #000 !important;
    box-shadow: 6px 6px 0 var(--shadow) !important;
}

[data-theme="dark"] .label-card,
[data-theme="mist"] .label-card {
    /* Ensure shadows and outlines look correct in dark modes */
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5) !important;
}

.label-wrapper {
    display: flex;
    flex-direction: column;
}

.label-header {
    border-bottom: 10px solid #000;
    padding-bottom: 6px;
}
.label-header h2 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 900 !important;
    font-size: 32px !important;
    margin: 0 !important;
    letter-spacing: -0.5px;
    line-height: 1.05;
    color: #000 !important;
}
.label-header .sub {
    font-size: 14px;
    margin-top: 2px;
    font-weight: 500;
    color: #000 !important;
}

.label-servings {
    border-bottom: 6px solid #000;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #000 !important;
}

.label-calories {
    border-bottom: 5px solid #000;
    padding: 8px 0 6px;
    color: #000 !important;
}
.label-calories .title {
    font-size: 12px;
    font-weight: 700;
}
.label-calories .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.label-calories .name {
    font-size: 28px;
    font-weight: 900;
}
.label-calories .val {
    font-size: 38px;
    font-weight: 900;
}

.label-table {
    display: flex;
    flex-direction: column;
    color: #000 !important;
}
.label-table .dv-header {
    text-align: right;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 0 2px;
    border-bottom: 1px solid #000;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000;
    padding: 7px 0;
    font-size: 14px;
}
.label-row.indent {
    padding-left: 16px;
}
.label-row.last {
    border-bottom: 10px solid #000;
}
.label-row .dv {
    font-weight: 700;
}

.label-footer {
    font-size: 10.5px;
    line-height: 1.4;
    padding-top: 8px;
    color: #555 !important;
}
