/* Inventory Component Styles */
.inventory-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 10px;
    margin: 2px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.inventory-item:hover, .shopping-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.inventory-item span, .shopping-item span {
    font-weight: 500;
    font-size: 1.1rem;
    color: #2c3e50;
    flex: 1;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nutrient-section {
    display: flex;
    align-items: center;
}

.nutrient-summary-text {
    font-size: 0.8em;
    color: #666;
    margin-right: 4px;
}

.remove-btn {
    padding: 2px 6px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.inventory-item input {
    width: 80px;
    margin: 0 15px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.inventory-item input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.nutrient-tags {
    margin-top: 4px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.nutrient-tag {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.nutrient-tag:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.add-nutrient-btn {
    padding: 2px 4px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.6em;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}

.add-nutrient-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.4);
}

.nutrient-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 2px 0;
    font-size: 0.85em;
    color: #666;
    line-height: 1.2;
}

.nutrient-summary:hover {
    color: #333;
}

.expand-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.expand-toggle:hover {
    background: #e9ecef;
    border-color: #999;
}

.nutrient-details {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eee;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.checkbox-group input {
    margin-right: 5px;
}

.checkbox-group h5 {
    margin: 2px 0;
    font-size: 1em;
    font-weight: bold;
    width: 100%;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 2px solid #e1e8ed;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #34495e;
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.quantity-input {
    width: 70px;
    text-align: center;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.quantity-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Inventory and shopping items mobile styles */
    .inventory-item, .shopping-item {
        padding: 8px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .item-row {
        flex-direction: column;
        gap: 8px;
    }

    .quantity-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .nutrient-section {
        width: 100%;
    }

    .inventory-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }

    .quantity-controls {
        margin: 0;
    }
}
