﻿/* ========================================
   INGREDIENT AUTOCOMPLETE STYLES - MODERN DESIGN
   ======================================== */

/* Dropdown Container - INCREASED HEIGHT */
.ingredient-suggestions-dropdown,
.dropdown {
    font-family: inherit;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 450px; /* INCREASED from 300px */
    overflow-y: auto;
    font-size: 14px;
}

    /* Scrollbar - Minimal */
    .dropdown::-webkit-scrollbar,
    .ingredient-suggestions-dropdown::-webkit-scrollbar {
        width: 8px;
    }

    .dropdown::-webkit-scrollbar-track,
    .ingredient-suggestions-dropdown::-webkit-scrollbar-track {
        background: transparent;
    }

    .dropdown::-webkit-scrollbar-thumb,
    .ingredient-suggestions-dropdown::-webkit-scrollbar-thumb {
        background: #d0d0d0;
        border-radius: 4px;
    }

        .dropdown::-webkit-scrollbar-thumb:hover,
        .ingredient-suggestions-dropdown::-webkit-scrollbar-thumb:hover {
            background: #a0a0a0;
        }

/* Section Headers - Subtle */
.suggestion-section-header,
.dropdown-header {
    padding: 10px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Dropdown Items - Clean spacing */
.suggestion-item,
.dropdown-item {
    padding: 14px 16px; /* INCREASED padding */
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Better for multi-line */
    transition: background-color 0.15s ease;
}

    .suggestion-item:last-child,
    .dropdown-item:last-child {
        border-bottom: none;
    }

    .suggestion-item:hover,
    .suggestion-item.active,
    .dropdown-item:hover,
    .dropdown-item--highlighted {
        background: #f8f8f8;
    }

    /* Minimal source indicators - no heavy colors */
    .suggestion-item.kroger-source {
        border-left: 2px solid #e0e0e0;
    }

        .suggestion-item.kroger-source:hover,
        .suggestion-item.kroger-source.active {
            background: #f8f8f8;
            border-left-color: #999;
        }

.custom-ingredient-option {
    border-left: 2px solid #e0e0e0;
}

    .custom-ingredient-option:hover,
    .custom-ingredient-option.active {
        background: #f8f8f8;
    }

/* Unavailable - subtle */
.suggestion-item.suggestion-unavailable,
.dropdown-item--unavailable {
    opacity: 0.5;
}

/* Recommended - minimal accent */
.dropdown-item--recommended {
    background: #fafafa;
    border-left: 2px solid #333;
}

    .dropdown-item--recommended:hover {
        background: #f0f0f0;
    }

/* Item Content */
.suggestion-main,
.dropdown-item__name {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.suggestion-name,
.dropdown-item__name {
    font-weight: 500;
    margin-bottom: 4px;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.4;
}

/* Item Details - Better spacing */
.suggestion-details,
.dropdown-item__meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px; /* INCREASED gap */
    flex-wrap: wrap;
    line-height: 1.5;
}

    /* Subtle color accents only for key info */
    .suggestion-details .price,
    .dropdown-item__meta .price {
        color: #1a1a1a;
        font-weight: 600;
    }

    .suggestion-details .item-number {
        color: #666;
        font-family: 'Courier New', monospace;
        font-size: 11px;
    }

    .suggestion-details .brand,
    .suggestion-details .size,
    .suggestion-details .category {
        color: #666;
    }

    .suggestion-details .availability {
        color: #999;
        font-style: italic;
    }

/* Source Icons - Minimal */
.suggestion-source,
.source-icon,
.section-icon {
    font-size: 14px;
    opacity: 0.4;
}

.suggestion-source {
    margin-left: 12px;
    flex-shrink: 0;
}

/* Status Messages */
.suggestion-loading,
.suggestion-error,
.suggestion-no-results,
.dropdown-item--no-results {
    padding: 24px 16px; /* INCREASED padding */
    text-align: center;
    color: #999;
    font-size: 13px;
    line-height: 1.6;
}

.suggestion-error {
    color: #d32f2f;
}

.dropdown-item--no-results:hover {
    background: transparent;
}

/* Unit Dropdown */
.unit-autocomplete-dropdown {
    max-height: 300px; /* Units need less height */
}

.unit-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .unit-autocomplete-item:hover,
    .unit-autocomplete-item--highlighted {
        background-color: #f8f8f8;
    }

.unit-autocomplete-item-name {
    font-weight: 500;
    color: #1a1a1a;
}

.unit-autocomplete-item-desc {
    font-size: 12px;
    color: #666;
}

/* Conversion Messages - Cleaner */
.conversion-progress {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    color: #666;
}

.conversion-success {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    color: #1a1a1a;
}

.conversion-error {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    color: #d32f2f;
}
.section-icon svg,
.source-icon svg {
    vertical-align: middle;
    opacity: 0.9;
}

.suggestion-item:hover .source-icon svg {
    opacity: 1;
}