﻿/* Compact Recipe Details CSS */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

.recipe-detail-container {
    max-width: 2560px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
}

/* Compact Hero Image */
.recipe-full-bleed-image {
    margin: -1rem -1rem 1.5rem -1rem;
    height: 350px;
    overflow: hidden;
}

.recipe-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Card */
.recipe-detail-card {
    background-color: transparent;
}

/* Title and Description */
.recipe-detail-intro {
    margin-bottom: 1.5rem;
}

.recipe-detail-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    
}

.recipe-description {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Compact Meta Section */
.recipe-meta-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #fff;
    border-radius: 6px;
    margin-bottom: 1.5rem;

}

.recipe-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
}

.meta-detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .meta-detail-item strong {
        color: #4a5568;
        font-weight: 600;
    }

/* Compact Badges */
.recipe-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recipe-badge,
.recipe-status-tag {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #e2e8f0;
    color: #4a5568;
}

.recipe-status-published {
    background: #d4edda;
    color: #155724;
}

.recipe-status-featured {
    background: #fff3cd;
    color: #856404;
}

/* Compact Two-Column Layout */
.recipe-columns-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Ingredients Column */
.recipe-ingredients-column {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 6px;

}

.recipe-ingredients-header {
    margin-bottom: 1rem;
}

.recipe-ingredients-title-row {
    margin-bottom: 1rem;
}

.recipe-ingredients-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2em;
    text-transform: uppercase; /* Ingredients List & Step list */
}

.subtitle-note { /* Quantity & Instruction */
    font-size: 0.7rem;
    color: #444;
    font-weight: 500;
    text-transform: lowercase;
}
.subtitle-note:before {
    content: '| ';
    padding-right: 3px;
}

/* Compact Controls */
.unit-toggle-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
}

.servings-control-group,
.unit-toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.servings-control-label,
.unit-toggle-label {
    font-weight: 500;
    color: #4a5568;
    min-width: fit-content;
}

.servings-control-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.servings-button {
    width: 28px;
    height: 28px;
    border: thin solid #cbd5e0;
    border-radius: 50px;
    background: #fff;
    color: #4a5568;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .servings-button:hover {
        background: #edf2f7;
    }

.servings-value {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
}

.servings-reset {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: transparent;
    color: #555;
    font-size: 0.75rem;
    cursor: pointer;
}

    .servings-reset.hidden {
        display: none;
    }

    .servings-reset svg {
        width: 12px;
        height: 12px;
    }

/* Unit Toggle Pills */
.unit-pill-container {
    position: relative;
    display: flex;
    background: #e2e8f0;
    border-radius: 4px;
    padding: 2px;
}

.unit-pill-button {
    padding: 0.25rem 0.75rem;
    border: none;
    background: transparent;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 2;
    border-radius: 2px;
    transition: color 0.2s;
}

    .unit-pill-button.active {
        color: #2d3748;
    }

.unit-pill-highlight {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Cost Toggle */
.cost-information-toggle {
    margin-bottom: 1rem;
}

.cost-toggle-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
}

    .cost-toggle-button:hover {
        background: #f7fafc;
        border-color: #cbd5e0;
    }

.cost-toggle-icon {
    font-size: 1rem;
}

.cost-toggle-text {
    flex: 1;
    text-align: left;
}

.cost-toggle-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

/* Ingredients List */
.recipe-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredient-group-header {
    margin: 1rem 0 0.5rem 0;
    padding: 0;

}

.recipe-detail-subheading {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.recipe-ingredient-item { /* Between each Ingredient */
    padding: .75rem;
    background: #fff;
    border-bottom: thin solid #eee;
}



.recipe-ingredient-main-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.375rem;
    font-size: 0.9rem;
}


.recipe-ingredient-quantity {
    font-weight: 600;
    color: #666;
    min-width: 2rem;
}

.recipe-ingredient-unit {
    color: #444;
    font-weight: 500;
    text-transform: lowercase;
}

.recipe-ingredient-name {
    color: #2d3748;
    flex: 1;
}
.recipe-ingredient-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.2rem;
}

.recipe-ingredient-note {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 10px!important;    
}

.conversion-indicator {
    font-size: 0.75rem;
    opacity: 0.7;
}

.recipe-ingredient-conversion {
    color: #805ad5;
    font-size: 0.75rem;
}

.conversion-method {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.025em;
    margin-right: 0.25rem;
}


/* Cost Details */
.cost-details {
    margin-top: 0.5rem;
    padding: 0.40rem 0.75rem;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 0.8rem;
}

.ingredient-meta-inline {
    display:flex;
    justify-content: space-between;
}

.ingredient-meta-inline-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.ingredient-type-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.meta-item.badge.kroger {
    background: #e6fffa;
    color: #234e52;
    background: blue!important;
}

    .meta-item.badge.linked {
        background: #e6fffa;
        color: #234e52;
    }

    .ingredient-type-badge.custom {
        background: #fef5e7;
        color: #744210;
    }



.ingredient-brand,
.ingredient-item-number {
    color: #718096;
    font-size: 0.75rem;
}

.ingredient-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ingredient-unit-price {
    color: #4a5568;
}

.ingredient-line-cost {
    font-weight: 600;
    color: #2d3748;
}

/* Instructions Column */
.recipe-instructions-column {
    padding: 1.25rem;
}

.recipe-steps-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    counter-reset: step-counter;
}

.recipe-step-item {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    position: relative;
}

    .recipe-step-item::before {
        content: counter(step-counter);
        position: absolute;
        left: 0;
        top: 0;
        width: 1.5rem;
        height: 1.5rem;
        background: #4299e1;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 600;
    }

.recipe-step-content {
    margin-left: 2rem;
}

.recipe-step-instruction {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.recipe-step-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #718096;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

    .recipe-step-time svg {
        width: 12px;
        height: 12px;
    }

.recipe-step-note {
    background: #fffbeb;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #f59e0b;
    font-size: 0.85rem;
}

/* Cost Summary */
.recipe-cost-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.recipe-cost-summary {
    font-size: 0.875rem;
}

.cost-summary-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #eee;
    padding: 4px 10px;

}

.cost-label {
    color: #4a5568;
    font-size: 0.8rem;
}

.serving-indicator {
    color: #718096;
}

.cost-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.cost-coverage {
    margin-bottom: 0.75rem;
}

.cost-coverage-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.coverage-label {
    color: #4a5568;
}

.coverage-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.coverage-progress {
    height: 100%;
    background: #48bb78;
    transition: width 0.3s ease;
}

.coverage-percentage {
    color: #48bb78;
    font-weight: 600;
    min-width: 2rem;
}

.cost-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4a5568;
}



/* Additional Info - Compact */
.recipe-additional-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17rem;
    margin: 2rem 0;
}

.recipe-nutrition-section,
.recipe-source-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
}

.recipe-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.recipe-nutrition-item {
    text-align: center;
    padding: 0.5rem;
    background: #fff;
    border-radius: 4px;
}

.recipe-metadata-label {
    display: block;
    font-size: 0.7rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.recipe-metadata-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.recipe-property-list {
    margin-top: 0.75rem;
}

.recipe-property-item {
    display: flex;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.recipe-property-label {
    font-weight: 500;
    color: #4a5568;
    min-width: 4rem;
}

.recipe-property-value {
    color: #2d3748;
}

.source-link {
    color: #4299e1;
    text-decoration: none;
}

    .source-link:hover {
        text-decoration: underline;
    }

/* Notes */
.recipe-notes-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.recipe-notes {
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* Action Buttons */
.recipe-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;

}

.recipe-action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

    .recipe-action-button:not(.secondary) {
        background: #4299e1;
        color: white;
        border: 1px solid #4299e1;
    }

        .recipe-action-button:not(.secondary):hover {
            background: #3182ce;
            border-color: #3182ce;
        }

    .recipe-action-button.secondary {
        background: #fff;
        color: #4a5568;
        border: 1px solid #cbd5e0;
    }

        .recipe-action-button.secondary:hover {
            background: #f7fafc;
            border-color: #a0aec0;
        }

    .recipe-action-button svg {
        width: 16px;
        height: 16px;
    }

/* Empty States */
.recipe-empty-state {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;

}

/* Responsive Design */
@media (max-width: 768px) {
    .recipe-detail-container {
        padding: 0.75rem;
    }

    .recipe-detail-card {
        padding: 1rem;
    }

    .recipe-detail-title {
        font-size: 1.5rem;
    }

    .recipe-full-bleed-image {
        margin: -0.75rem -0.75rem 1rem -0.75rem;
        height: 150px;
    }

    .recipe-meta-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .recipe-meta-details {
        justify-content: space-between;
    }

    .recipe-columns-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .unit-toggle-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .recipe-additional-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cost-summary-main {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .recipe-nutrition-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .recipe-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .recipe-detail-container {
        padding: 0.5rem;
    }

    .recipe-detail-card {
        padding: 0.75rem;
    }

    .recipe-ingredients-column,
    .recipe-instructions-column {
        padding: 1rem;
    }

    .servings-control-group,
    .unit-toggle-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .unit-pill-container {
        width: 100%;
    }

    .recipe-ingredient-main-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .recipe-ingredient-quantity,
    .recipe-ingredient-unit {
        display: inline;
    }

    .recipe-nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Compact additions to existing CSS */
.recipe-completion-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    background: #fef5;
    width: max-content;
    color: #744210;
    margin-left: 0.5rem;
    font-weight: 500;
}

.recipe-allergen-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .recipe-allergen-badge.contains {
        background: #fed7d7;
        color: #9b2c2c;
    }

    .recipe-allergen-badge.free-from {
        background: #c6f6d5;
        color: #2f855a;
    }

.recipe-tags-row {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.recipe-tag-pill {
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.65rem;
    background: #edf2f7;
    color: #4a5568;
    font-weight: 400;
}

@media (max-width: 768px) {
    .recipe-completion-badge {
        display: block;
        margin: 0.25rem 0 0 0;
    }

    .recipe-tags-row {
        margin-top: 0.25rem;
    }
}

/* Additional CSS for unit optimization functionality */

/* Update unit controls container to accommodate new optimize button */
.unit-controls-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

/* Optimize button styling */
.optimize-button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    justify-content: center;
}

    .optimize-button:hover {
        background: #f7fafc;
        border-color: #cbd5e0;
    }

    .optimize-button.active {
        background: #805ad5;
        color: white;
        border-color: #805ad5;
    }

        .optimize-button.active:hover {
            background: #6b46c1;
            border-color: #6b46c1;
        }

.optimize-icon {
    font-size: 0.875rem;
}

.optimize-label {
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .unit-controls-container {
        flex-direction: row;
        gap: 0.5rem;
    }

    .optimize-button {
        flex: 1;
        min-width: 0;
    }

    .optimize-label {
        display: none;
    }

    .optimize-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .unit-toggle-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .unit-controls-container {
        width: 100%;
    }
}

/* Additional existing CSS from previous artifacts */
.recipe-completion-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    background: #fef5e7;
    color: #744210;
    margin-left: 0.5rem;
    font-weight: 500;
}

.recipe-allergen-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .recipe-allergen-badge.contains {
        background: #fed7d7;
        color: #9b2c2c;
    }

    .recipe-allergen-badge.free-from {
        background: #c6f6d5;
        color: #2f855a;
    }

.recipe-tags-row {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.recipe-tag-pill {
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.65rem;
    background: #edf2f7;
    color: #4a5568;
    font-weight: 400;
}

/* Add this CSS after the existing .recipe-nutrition-grid styles (around line 650) */

/* Recipe Info Grid - consistent with nutrition grid */
.recipe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.recipe-info-item {
    text-align: center;
    padding: 0.5rem;
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    /* Update source link styling for the grid layout */
    .recipe-info-item .source-link {
        color: #4299e1;
        text-decoration: none;
        font-weight: 500;
    }

        .recipe-info-item .source-link:hover {
            text-decoration: underline;
        }

/* Responsive adjustments for recipe info grid */
@media (max-width: 768px) {
    .recipe-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .recipe-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nutrition-metadata {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.nutrition-source-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.nutrition-source-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.nutrition-estimated-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.nutrition-confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-bar {
    flex: 1;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    transition: width 0.3s ease;
}

.confidence-percentage {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 3rem;
}

/* Compact nutrition metadata styles */
.nutrition-source-compact {
    font-size: 0.875rem;
    line-height: 1.4;
}

.source-primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.source-text {
    color: #6b7280;
    font-weight: 500;
}

.confidence-compact {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.source-breakdown-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.8rem;
    color: #6b7280;
}

.source-chip {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #374151;
}

.methodology-link {
    background: none;
    border: none;
    color: #6366f1;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
}

    .methodology-link:hover {
        color: #4f46e5;
    }

.methodology-explanation {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #e5e7eb;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .source-primary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .source-breakdown-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Add these styles for the user-friendly nutrition display */
.nutrition-quality-indicator {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.nutrition-quality-header {
    margin-bottom: 1rem;
}

.nutrition-quality-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.nutrition-quality-label {
    font-weight: 500;
    color: #6c757d;
}

.nutrition-quality-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.nutrition-quality--excellent {
    background: #d4edda;
    color: #155724;
}

.nutrition-quality--good {
    background: #cce6f4;
    color: #0c5460;
}

.nutrition-quality--fair {
    background: #fff3cd;
    color: #856404;
}

.nutrition-quality--limited {
    background: #f8d7da;
    color: #721c24;
}

.nutrition-confidence {
    font-weight: 600;
    color: #495057;
}

.nutrition-confidence-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-progress {
    height: 100%;
    transition: width 0.3s ease;
}

    .confidence-progress.nutrition-quality--excellent {
        background: #28a745;
    }

    .confidence-progress.nutrition-quality--good {
        background: #17a2b8;
    }

    .confidence-progress.nutrition-quality--fair {
        background: #ffc107;
    }

    .confidence-progress.nutrition-quality--limited {
        background: #dc3545;
    }

.nutrition-sources-breakdown {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.source-item {
    display: grid;
    grid-template-columns: 1fr 60px 40px;
    align-items: center;
    gap: 0.75rem;
}

.source-info {
    display: flex;
    flex-direction: column;
}

.source-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.source-count {
    font-size: 0.75rem;
    color: #6c757d;
}

.source-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.source-progress {
    height: 100%;
}

.source-progress--basic {
    background: #28a745;
}

.source-progress--packaged {
    background: #17a2b8;
}

.source-percentage {
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
    text-align: right;
}

.nutrition-explanation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.nutrition-info-toggle {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.nutrition-methodology {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

    .nutrition-methodology p {
        margin: 0 0 0.5rem 0;
        font-size: 0.875rem;
        color: #495057;
        line-height: 1.4;
    }

        .nutrition-methodology p:last-child {
            margin-bottom: 0;
        }

.nutrition-disclaimer {
    color: #856404 !important;
    font-style: italic;
}

.nutrition-sources-simple {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid #dee2e6;
}

.source-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.recipe-nutrition-item--highlight {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding-left: 0.75rem;
}


/* Kroger Data */
/* Kroger Price Update Section Styles */
.kroger-price-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.kroger-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.kroger-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kroger-icon {
    font-size: 20px;
}

.kroger-price-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kroger-price-title {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.kroger-price-timestamp {
    font-size: 13px;
    color: #6c757d;
}

.price-age {
    color: #dc3545;
    font-weight: 500;
}

.kroger-price-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Store Selection Button */
.kroger-store-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #28a745;
    border-radius: 6px;
    color: #28a745;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .kroger-store-button:hover {
        background: #28a745;
        color: white;
    }

    .kroger-store-button.store-selected {
        background: #28a745;
        color: white;
    }

/* Price Update Button */
.kroger-update-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .kroger-update-button:hover:not(:disabled) {
        background: #0056b3;
    }

    .kroger-update-button:disabled {
        background: #6c757d;
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Update Status and Progress */
.kroger-update-status {
    margin-top: 16px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
}

.update-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: #495057;
    text-align: center;
}

/* Kroger Ingredient Styling */
.ingredient-type-badge.kroger {
    background: #28a745;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.kroger-ingredient {
    border-left: 3px solid #28a745;
    position: relative;
}

    .kroger-ingredient .recipe-ingredient-name::after {
        content: "🏪";
        font-size: 12px;
        margin-left: 6px;
        opacity: 0.7;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .kroger-price-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .kroger-price-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .kroger-store-button,
    .kroger-update-button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .kroger-price-actions {
        flex-direction: column;
        gap: 8px;
    }

    .kroger-store-button,
    .kroger-update-button {
        width: 100%;
    }
}


.ingredient-meta-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.meta-item {
    white-space: nowrap;
}

    .meta-item.badge {
        padding: 0.125rem 0.375rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
    }

        .meta-item.badge.kroger {
            background: var(--green-50);
            color: var(--green-700);
        }

        .meta-item.badge.linked {
            background: var(--gray-100);
            color: var(--gray-700);
        }

    .meta-item.price {
        font-weight: 500;
    }

    .meta-item.total {
        font-weight: 600;
        color: var(--gray-800);
    }

.meta-separator {
    color: var(--gray-400);
}